@@ -277,9 +277,7 @@ def ctw(args, extraVMarguments=None):
277277 args , vmargs = parser .parse_known_args (args )
278278 vmargs .extend (_remove_empty_entries (extraVMarguments ))
279279
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' )
283281
284282 # Disable JVMCICompiler by default if not specified
285283 if _get_XX_option_value (vmargs , 'UseJVMCICompiler' , None ) is None :
@@ -291,8 +289,6 @@ def ctw(args, extraVMarguments=None):
291289
292290 if args .cp :
293291 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' )
296292 else :
297293 # Default to the CompileTheWorld.SUN_BOOT_CLASS_PATH token
298294 cp = None
@@ -307,24 +303,20 @@ def ctw(args, extraVMarguments=None):
307303 if _get_XX_option_value (vmargs , 'BootstrapJVMCI' , False ) is None :
308304 vmargs .append ('-XX:+BootstrapJVMCI' )
309305
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' ]
328320
329321 run_vm (vmargs + mainClassAndArgs )
330322
0 commit comments