@@ -277,9 +277,7 @@ def ctw(args, extraVMarguments=None):
277
277
args , vmargs = parser .parse_known_args (args )
278
278
vmargs .extend (_remove_empty_entries (extraVMarguments ))
279
279
280
- # Enable jvmci by default if not specified
281
- if _get_XX_option_value (vmargs , 'EnableJVMCI' , None ) is None :
282
- vmargs .append ('-XX:+EnableJVMCI' )
280
+ vmargs .append ('-XX:+EnableJVMCI' )
283
281
284
282
# Disable JVMCICompiler by default if not specified
285
283
if _get_XX_option_value (vmargs , 'UseJVMCICompiler' , None ) is None :
@@ -291,8 +289,6 @@ def ctw(args, extraVMarguments=None):
291
289
292
290
if args .cp :
293
291
cp = os .path .abspath (args .cp )
294
- if not _is_jvmci_enabled (vmargs ):
295
- mx .abort ('Non-Graal CTW does not support specifying a specific class path or jar to compile' )
296
292
else :
297
293
# Default to the CompileTheWorld.SUN_BOOT_CLASS_PATH token
298
294
cp = None
@@ -307,24 +303,20 @@ def ctw(args, extraVMarguments=None):
307
303
if _get_XX_option_value (vmargs , 'BootstrapJVMCI' , False ) is None :
308
304
vmargs .append ('-XX:+BootstrapJVMCI' )
309
305
310
- mainClassAndArgs = []
311
- if not _is_jvmci_enabled (vmargs ):
312
- vmargs .append ('-XX:+CompileTheWorld' )
313
- else :
314
- # To be able to load all classes in the JRT with Class.forName,
315
- # all JDK modules need to be made root modules.
316
- limitmods = frozenset (args .limitmods .split (',' )) if args .limitmods else None
317
- graaljdk = get_graaljdk ()
318
- nonBootJDKModules = [m .name for m in graaljdk .get_modules () if not m .boot and (limitmods is None or m .name in limitmods )]
319
- if nonBootJDKModules :
320
- vmargs .append ('--add-modules=' + ',' .join (nonBootJDKModules ))
321
- if args .limitmods :
322
- vmargs .append ('-DCompileTheWorld.limitmods=' + args .limitmods )
323
- if cp is not None :
324
- vmargs .append ('-DCompileTheWorld.Classpath=' + cp )
325
- cp = _remove_redundant_entries (mx .classpath ('GRAAL_TEST' , jdk = graaljdk ))
326
- vmargs .extend (_ctw_jvmci_export_args () + ['-cp' , cp ])
327
- mainClassAndArgs = ['jdk.graal.compiler.hotspot.test.CompileTheWorld' ]
306
+ # To be able to load all classes in the JRT with Class.forName,
307
+ # all JDK modules need to be made root modules.
308
+ limitmods = frozenset (args .limitmods .split (',' )) if args .limitmods else None
309
+ graaljdk = get_graaljdk ()
310
+ nonBootJDKModules = [m .name for m in graaljdk .get_modules () if not m .boot and (limitmods is None or m .name in limitmods )]
311
+ if nonBootJDKModules :
312
+ vmargs .append ('--add-modules=' + ',' .join (nonBootJDKModules ))
313
+ if args .limitmods :
314
+ vmargs .append ('-DCompileTheWorld.limitmods=' + args .limitmods )
315
+ if cp is not None :
316
+ vmargs .append ('-DCompileTheWorld.Classpath=' + cp )
317
+ cp = _remove_redundant_entries (mx .classpath ('GRAAL_TEST' , jdk = graaljdk ))
318
+ vmargs .extend (_ctw_jvmci_export_args () + ['-cp' , cp ])
319
+ mainClassAndArgs = ['jdk.graal.compiler.hotspot.test.CompileTheWorld' ]
328
320
329
321
run_vm (vmargs + mainClassAndArgs )
330
322
0 commit comments