changeset 22646:3af40fab60c2

Use make clean to clean hotspot build
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Thu, 01 Oct 2015 18:48:05 +0200
parents c33f0cb02b34
children a2af5a344c65
files mx.jvmci/mx_jvmci.py
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mx.jvmci/mx_jvmci.py	Thu Oct 01 16:31:04 2015 +0200
+++ b/mx.jvmci/mx_jvmci.py	Thu Oct 01 18:48:05 2015 +0200
@@ -1021,9 +1021,16 @@
                 shutil.rmtree(name, ignore_errors=False, onerror=handleRemoveReadonly)
             elif os.path.isfile(name):
                 os.unlink(name)
-
-        rmIfExists(join(_suite.dir, 'build'))
-        rmIfExists(join(_suite.dir, 'build-nojvmci'))
+        nojvmci_outputdir = join(_suite.dir, 'build-nojvmci', _hotspotOs(mx.get_os()))
+        makeFiles = join(_suite.dir, 'make')
+        if mx._opts.verbose:
+            outCapture = None
+        else:
+            def _consume(s):
+                pass
+            outCapture = _consume
+        mx.run([mx.gmake_cmd(), 'ALT_BOOTDIR=' + get_jvmci_bootstrap_jdk().home, 'clean'], out=outCapture, cwd=makeFiles)
+        mx.run([mx.gmake_cmd(), 'ALT_BOOTDIR=' + get_jvmci_bootstrap_jdk().home, 'ALT_OUTPUTDIR=' + nojvmci_outputdir, 'clean'], out=outCapture, cwd=makeFiles)
         rmIfExists(_jdksDir())
         self._newestOutput = None