@@ -345,9 +345,6 @@ def hosting_registry(self):
345
345
def launcher_class (self ):
346
346
raise NotImplementedError ()
347
347
348
- def run_in_graalvm (self , cwd , args , extra_polyglot_args , host_vm ):
349
- raise NotImplementedError ()
350
-
351
348
def get_extra_polyglot_args (self ):
352
349
raise NotImplementedError ()
353
350
@@ -374,8 +371,6 @@ def run(self, cwd, args):
374
371
extra_polyglot_args = self .get_extra_polyglot_args ()
375
372
376
373
host_vm = self .host_vm ()
377
- if hasattr (host_vm , 'run_lang' ): # this is a full GraalVM build
378
- return self .run_in_graalvm (cwd , args , extra_polyglot_args , host_vm )
379
374
380
375
# Otherwise, we're running from the source tree
381
376
args = self ._remove_vm_prefix_for_all (args )
@@ -457,14 +452,6 @@ def run(self, cwd, args):
457
452
sys .exit (1 )
458
453
return super ().run (cwd , args )
459
454
460
- def run_in_graalvm (self , cwd , args , extra_polyglot_args , host_vm ):
461
- with environ (self ._env or {}):
462
- cp = self .get_classpath ()
463
- if len (cp ) > 0 :
464
- extra_polyglot_args .append ("--vm.classpath=" + ":" .join (cp ))
465
- launcher_name = 'graalpy'
466
- return self ._validate_output (* host_vm .run_launcher (launcher_name , extra_polyglot_args + args , cwd ))
467
-
468
455
def get_extra_polyglot_args (self ):
469
456
return ["--experimental-options" , "-snapshot-startup" , "--python.MaxNativeMemory=%s" % (2 ** 34 )] + self ._extra_polyglot_args
470
457
@@ -480,10 +467,9 @@ def __init__(self, config_name=CONFIGURATION_DEFAULT, cp_suffix=None, distributi
480
467
def launcher_class (self ):
481
468
return 'com.oracle.graal.python.benchmarks.JavaBenchmarkDriver'
482
469
483
- def run_in_graalvm (self , cwd , args , extra_polyglot_args , host_vm ):
484
- # In GraalVM we run the Java benchmarks driver like one would run any other Java application
485
- # that embeds GraalPython on GraalVM. We need to add the dependencies on class path, and since
486
- # we use run_java, we need to do some output postprocessing that normally run_launcher would do
470
+ def run (self , cwd , args ):
471
+ extra_polyglot_args = self .get_extra_polyglot_args ()
472
+ host_vm = self .host_vm ()
487
473
with environ (self ._env or {}):
488
474
cp = self .get_classpath ()
489
475
jhm = mx .dependency ("mx:JMH_1_21" )
0 commit comments