Skip to content

Commit 01feb75

Browse files
committed
Inject the graalpy dsl build args to the native image build
1 parent de59763 commit 01feb75

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,11 @@ def _python_checkpatchfiles():
20112011
def bytecode_dsl_build_args():
20122012
return ['-Dpython.EnableBytecodeDSLInterpreter=true'] if BYTECODE_DSL_INTERPRETER else []
20132013

2014+
mx_subst.results_substitutions.register_no_arg(
2015+
'bytecode_dsl_build_args',
2016+
lambda: f'-Dpython.EnableBytecodeDSLInterpreter={repr(BYTECODE_DSL_INTERPRETER).lower()}'
2017+
)
2018+
20142019
mx_sdk.register_graalvm_component(mx_sdk.GraalVmLanguage(
20152020
suite=SUITE,
20162021
name='GraalVM Python',

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import re
3131
import shlex
3232
import subprocess
33-
from abc import ABC, abstractproperty, abstractmethod
33+
from abc import ABC, abstractproperty
3434
from contextlib import contextmanager
3535
from os.path import join
3636
from datetime import datetime
@@ -269,7 +269,7 @@ def post_process_command_line_args(self, args):
269269
def is_bytecode_dsl_config(self):
270270
return '--vm.Dpython.EnableBytecodeDSLInterpreter=true' in self.get_extra_polyglot_args()
271271

272-
def extract_vm_info(self, args):
272+
def extract_vm_info(self, args=None):
273273
out_version = subprocess.check_output([self.interpreter, '--version'], universal_newlines=True)
274274
# The benchmark data goes back a ways, we modify the reported dims for
275275
# continuity with the historical queries

mx.graalpython/suite.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@
841841
"-H:-CopyLanguageResources",
842842
"-Dpolyglot.python.PosixModuleBackend=native",
843843
"-Dpolyglot.python.Sha3ModuleBackend=native",
844+
"<bytecode_dsl_build_args>",
844845
],
845846
},
846847
},

0 commit comments

Comments
 (0)