changeset 23343:c8526451bb6b

register DEFAULT_VM as env var to be captured in IDE configs
author Doug Simon <doug.simon@oracle.com>
date Mon, 04 Apr 2016 22:42:53 +0200
parents c8df6d6c23f7
children 32d6bceb9adc
files mx.jvmci/mx_jvmci.py mx.jvmci/suite.py
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mx.jvmci/mx_jvmci.py	Wed Mar 30 16:25:12 2016 +0200
+++ b/mx.jvmci/mx_jvmci.py	Mon Apr 04 22:42:53 2016 +0200
@@ -480,7 +480,7 @@
             with VM(vm, bld):
                 build([])
             return
-    mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM')
+    mx.abort('You need to run "mx --vm=' + vm + ' --vmbuild=' + bld + ' build" to build the selected VM')
 
 def check_VM_exists(vm, jdkDir, build=None):
     if not build:
@@ -1111,7 +1111,7 @@
             if len(result.remainder) != 0:
                 firstBuildTarget = result.remainder[0]
                 mx.abort('To specify the ' + firstBuildTarget + ' VM build target, you need to use the global "--vmbuild" option. For example:\n' +
-                         '    mx --vmbuild ' + firstBuildTarget + ' build')
+                         '    mx --vmbuild=' + firstBuildTarget + ' build')
             return result
 
     # Call mx.build to compile the Java sources
@@ -1289,7 +1289,7 @@
                 mx.log('BEGIN: ' + vm + '-' + vmbuild + '\t(see: ' + logFile + ')')
                 verbose = ['-v'] if mx._opts.verbose else []
                 # Run as subprocess so that output can be directed to a file
-                cmd = [sys.executable, '-u', mx.__file__] + verbose + ['--vm', vm, '--vmbuild', vmbuild, 'build']
+                cmd = [sys.executable, '-u', mx.__file__] + verbose + ['--vm=' + vm, '--vmbuild=' + vmbuild, 'build']
                 mx.logv("executing command: " + str(cmd))
                 subprocess.check_call(cmd, cwd=_suite.dir, stdout=log, stderr=subprocess.STDOUT)
                 duration = datetime.timedelta(seconds=time.time() - start)
@@ -1586,6 +1586,12 @@
 mx.add_argument('--gdb', action='store_const', const='/usr/bin/gdb --args', dest='vm_prefix', help='alias for --vmprefix "/usr/bin/gdb --args"')
 mx.add_argument('--lldb', action='store_const', const='lldb --', dest='vm_prefix', help='alias for --vmprefix "lldb --"')
 
+# The mx builders are run inside the directory of their associated suite,
+# not the primary suite, so they might not see the env file of the primary
+# suite. Capture DEFAULT_VM in case it was only defined in the primary
+# suite.
+mx.add_ide_envvar('DEFAULT_VM')
+
 class JVMCIArchiveParticipant:
     def __init__(self, dist):
         self.dist = dist
--- a/mx.jvmci/suite.py	Wed Mar 30 16:25:12 2016 +0200
+++ b/mx.jvmci/suite.py	Mon Apr 04 22:42:53 2016 +0200
@@ -1,5 +1,5 @@
 suite = {
-  "mxversion" : "5.12.0",
+  "mxversion" : "5.17.0",
   "name" : "jvmci",
   "url" : "http://openjdk.java.net/projects/graal",
   "developer" : {