diff mx.jvmci/mx_jvmci.py @ 22601:bc2d4dac0cd3

JVMCI options are now passed as individual -Djvmci.option.<name>=<value> arguments on the command line instead of -Djvmci.options=<multiple options settings separated by spaces>
author Doug Simon <doug.simon@oracle.com>
date Tue, 22 Sep 2015 22:29:28 +0200
parents 0dcb75831004
children 2448e3c0cd98
line wrap: on
line diff
--- a/mx.jvmci/mx_jvmci.py	Tue Sep 22 11:57:49 2015 -0700
+++ b/mx.jvmci/mx_jvmci.py	Tue Sep 22 22:29:28 2015 +0200
@@ -1758,22 +1758,15 @@
             args = jacocoArgs + args
 
         # Support for -G: options
-        jvmciArgs = []
-        nonJvmciArgs = []
-        existingJvmciOptionsProperty = None
-        for a in args:
-            if a.startswith('-G:'):
-                # Escape space with % and % with %%
-                jvmciArg = a[len('-G:'):].replace('%', '%%').replace(' ', '% ')
-                jvmciArgs.append(jvmciArg)
-            else:
-                if a.startswith('-Djvmci.options=') or a == '-Djvmci.options':
-                    existingJvmciOptionsProperty = a
-                nonJvmciArgs.append(a)
-        if jvmciArgs:
-            if existingJvmciOptionsProperty:
-                mx.abort('defining jvmci.option property is incompatible with defining one or more -G: options: ' + existingJvmciOptionsProperty)
-            args = ['-Djvmci.options=' + ' '.join(jvmciArgs)] + nonJvmciArgs
+        def translateGOption(arg):
+            if arg.startswith('-G:+'):
+                arg = '-Djvmci.option.' + arg[len('-G:+'):] + '=true'
+            elif arg.startswith('-G:-'):
+                arg = '-Djvmci.option.' + arg[len('-G:+'):] + '=false'
+            elif arg.startswith('-G:'):
+                arg = '-Djvmci.option.' + arg[len('-G:'):]
+            return arg
+        args = map(translateGOption, args)
 
         args = ['-Xbootclasspath/p:' + dep.classpath_repr() for dep in _jvmci_bootclasspath_prepends] + args