Skip to content

Commit e2dd9a3

Browse files
committed
Allow overriding the G1GC from the mx commandline
1 parent 7e69e05 commit e2dd9a3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,13 @@ def graalpy_standalone_deps():
271271
def libpythonvm_build_args():
272272
build_args = []
273273
build_args += bytecode_dsl_build_args()
274-
if mx_sdk_vm_ng.is_nativeimage_ee() and mx.get_os() == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ:
274+
extras = mx.get_opts().extra_image_builder_argument
275+
if (
276+
mx_sdk_vm_ng.is_nativeimage_ee() and
277+
mx.get_os() == 'linux' and
278+
'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ and
279+
not any(arg.startswith("--gc") for arg in extras)
280+
):
275281
build_args += ['--gc=G1', '-H:-ProtectionKeys']
276282
if not os.environ.get("GRAALPY_PGO_PROFILE") and mx.suite('graalpython-enterprise', fatalIfMissing=False) and mx_sdk_vm_ng.get_bootstrap_graalvm_version() >= mx.VersionSpec("25.0"):
277283
cmd = mx.command_function('python-get-latest-profile', fatalIfMissing=False)

0 commit comments

Comments
 (0)