changeset 21584:9bb04af58490

support DEFAULT_VM=graal in mx/env
author Doug Simon <doug.simon@oracle.com>
date Fri, 29 May 2015 11:35:20 +0200
parents 16eff885df66
children 6da76343d830 59c3f921e454
files mx/mx_graal.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mx/mx_graal.py	Fri May 29 10:38:52 2015 +0200
+++ b/mx/mx_graal.py	Fri May 29 11:35:20 2015 +0200
@@ -53,7 +53,7 @@
     'server-nojvmci' : None,  # all compilation with tiered system (i.e., client + server), JVMCI omitted
     'client-nojvmci' : None,  # all compilation with client compiler, JVMCI omitted
     'original' : None,  # default VM copied from bootstrap JDK
-    'graal' : 'Alias for jvmci',
+    'graal' : None, # alias for jvmci
 }
 
 """ The VM that will be run by the 'vm' command and built by default by the 'build' command.
@@ -118,10 +118,16 @@
     if _vm:
         return _vm
     vm = mx.get_env('DEFAULT_VM')
+    envPath = join(_graal_home, 'mx', 'env')
+    if vm == 'graal':
+        if exists(envPath):
+            with open(envPath) as fp:
+                if 'DEFAULT_VM=graal' in fp.read():
+                    mx.log('Please update the DEFAULT_VM entry in ' + envPath + ' to use "jvmti" instead of "graal" as the value')
+        vm = 'jvmci'
     if vm is None:
         if not mx.is_interactive():
             mx.abort('Need to specify VM with --vm option or DEFAULT_VM environment variable')
-        envPath = join(_graal_home, 'mx', 'env')
         mx.log('Please select the VM to be executed from the following: ')
         items = [k for k in _vmChoices.keys() if _vmChoices[k] is not None]
         descriptions = [_vmChoices[k] for k in _vmChoices.keys() if _vmChoices[k] is not None]