Skip to content

Commit 5804b01

Browse files
committed
faster python_gvm build
1 parent 24c03ba commit 5804b01

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,27 +304,29 @@ def set_env(**environ):
304304

305305
def python_gvm(args=None):
306306
"Build and run a GraalVM graalpython launcher"
307-
with set_env(FORCE_BASH_LAUNCHERS="true", DISABLE_AGENT="true", DISABLE_LIBPOLYGLOT="true", DISABLE_POLYGLOT="true"):
308-
return _python_graalvm_launcher(args or [])
307+
return _python_graalvm_launcher(args or [])
309308

310309

311310
def python_svm(args=None):
312311
"Build and run the native graalpython image"
313312
with set_env(FORCE_BASH_LAUNCHERS="lli,native-image,gu,graalvm-native-clang,graalvm-native-clang++", DISABLE_LIBPOLYGLOT="true", DISABLE_POLYGLOT="true"):
314-
return _python_graalvm_launcher(args or [])
313+
return _python_graalvm_launcher((args or []) + ["svm"])
315314

316315

317316
def python_so(args):
318317
"Build the native shared object that includes graalpython"
319318
with set_env(FORCE_BASH_LAUNCHERS="true", DISABLE_LIBPOLYGLOT="false", DISABLE_POLYGLOT="true"):
320-
return _python_graalvm_launcher(args)
319+
return _python_graalvm_launcher((args or []) + ["svm"])
321320

322321

323322
def _python_graalvm_launcher(args):
324-
dy = "/vm,/tools,/substratevm"
323+
dy = "/vm,/tools"
325324
if "sandboxed" in args:
326325
args.remove("sandboxed")
327326
dy += ",/sulong-managed,/graalpython-enterprise"
327+
if "svm" in args:
328+
args.remove("svm")
329+
dy += ",/substratevm"
328330
dy = ["--dynamicimports", dy]
329331
mx.run_mx(dy + ["build"])
330332
out = mx.OutputCapture()

0 commit comments

Comments
 (0)