Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
22397:7202e96981c6 | 22398:4f6caa445b92 |
---|---|
1056 if jacocoArgs: | 1056 if jacocoArgs: |
1057 args = jacocoArgs + args | 1057 args = jacocoArgs + args |
1058 exe = join(jdk, 'bin', mx.exe_suffix('java')) | 1058 exe = join(jdk, 'bin', mx.exe_suffix('java')) |
1059 pfx = _vm_prefix.split() if _vm_prefix is not None else [] | 1059 pfx = _vm_prefix.split() if _vm_prefix is not None else [] |
1060 | 1060 |
1061 # Support for legacy -G: options | |
1062 jvmciArgs = [] | |
1063 nonJvmciArgs = [] | |
1064 existingJvmciOptionsProperty = None | |
1065 for a in args: | |
1066 if a.startswith('-G:'): | |
1067 jvmciArg = a[len('-G:'):] | |
1068 assert ' ' not in jvmciArg, 'space not supported in JVMCI arg: ' + a | |
1069 jvmciArgs.append(a[len('-G:'):]) | |
1070 else: | |
1071 if a.startswith('-Djvmci.options=') or a == '-Djvmci.options': | |
1072 existingJvmciOptionsProperty = a | |
1073 nonJvmciArgs.append(a) | |
1074 if jvmciArgs: | |
1075 if existingJvmciOptionsProperty: | |
1076 mx.abort('defining jvmci.option property is incompatible with defining one or more -G: options: ' + existingJvmciOptionsProperty) | |
1077 args = ['-Djvmci.options=' + ' '.join(jvmciArgs)] + nonJvmciArgs | |
1078 | |
1061 if '-version' in args: | 1079 if '-version' in args: |
1062 ignoredArgs = args[args.index('-version') + 1:] | 1080 ignoredArgs = args[args.index('-version') + 1:] |
1063 if len(ignoredArgs) > 0: | 1081 if len(ignoredArgs) > 0: |
1064 mx.log("Warning: The following options will be ignored by the vm because they come after the '-version' argument: " + ' '.join(ignoredArgs)) | 1082 mx.log("Warning: The following options will be ignored by the vm because they come after the '-version' argument: " + ' '.join(ignoredArgs)) |
1065 | 1083 |
1694 elif arcname.startswith('META-INF/jvmci.options/'): | 1712 elif arcname.startswith('META-INF/jvmci.options/'): |
1695 # Need to create service files for the providers of the | 1713 # Need to create service files for the providers of the |
1696 # jdk.internal.jvmci.options.Options service created by | 1714 # jdk.internal.jvmci.options.Options service created by |
1697 # jdk.internal.jvmci.options.processor.OptionProcessor. | 1715 # jdk.internal.jvmci.options.processor.OptionProcessor. |
1698 optionsOwner = arcname[len('META-INF/jvmci.options/'):] | 1716 optionsOwner = arcname[len('META-INF/jvmci.options/'):] |
1699 provider = optionsOwner + '_Options' | 1717 provider = optionsOwner + '_OptionDescriptors' |
1700 self.expectedOptionsProviders.add(provider.replace('.', '/') + '.class') | 1718 self.expectedOptionsProviders.add(provider.replace('.', '/') + '.class') |
1701 self.services.setdefault('jdk.internal.jvmci.options.Options', []).append(provider) | 1719 self.services.setdefault('jdk.internal.jvmci.options.OptionDescriptors', []).append(provider) |
1702 return False | 1720 return False |
1703 | 1721 |
1704 def __addsrc__(self, arcname, contents): | 1722 def __addsrc__(self, arcname, contents): |
1705 return False | 1723 return False |
1706 | 1724 |