Mercurial > hg > graal-jvmci-8
diff mx.jvmci/mx_jvmci.py @ 22398:4f6caa445b92
moved JVMCI option parsing back into Java
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 04 Aug 2015 00:47:34 +0200 |
parents | 63e7eb179710 |
children | b876144b52f3 |
line wrap: on
line diff
--- a/mx.jvmci/mx_jvmci.py Mon Aug 03 15:19:14 2015 +0200 +++ b/mx.jvmci/mx_jvmci.py Tue Aug 04 00:47:34 2015 +0200 @@ -1058,6 +1058,24 @@ exe = join(jdk, 'bin', mx.exe_suffix('java')) pfx = _vm_prefix.split() if _vm_prefix is not None else [] + # Support for legacy -G: options + jvmciArgs = [] + nonJvmciArgs = [] + existingJvmciOptionsProperty = None + for a in args: + if a.startswith('-G:'): + jvmciArg = a[len('-G:'):] + assert ' ' not in jvmciArg, 'space not supported in JVMCI arg: ' + a + jvmciArgs.append(a[len('-G:'):]) + 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 + if '-version' in args: ignoredArgs = args[args.index('-version') + 1:] if len(ignoredArgs) > 0: @@ -1696,9 +1714,9 @@ # jdk.internal.jvmci.options.Options service created by # jdk.internal.jvmci.options.processor.OptionProcessor. optionsOwner = arcname[len('META-INF/jvmci.options/'):] - provider = optionsOwner + '_Options' + provider = optionsOwner + '_OptionDescriptors' self.expectedOptionsProviders.add(provider.replace('.', '/') + '.class') - self.services.setdefault('jdk.internal.jvmci.options.Options', []).append(provider) + self.services.setdefault('jdk.internal.jvmci.options.OptionDescriptors', []).append(provider) return False def __addsrc__(self, arcname, contents):