From 0da6c3554966c46551fed428f43d5e93262f102c Mon Sep 17 00:00:00 2001 From: Michal Karm Babacek Date: Thu, 9 Jun 2022 17:47:38 +0200 Subject: [PATCH] Enables native-image script (bash, cmd) to handle module path with spaces The prolem does not affect distributions that use native-image executable. e.g. https://github.com/graalvm/mandrel/issues/386 --- sdk/mx.sdk/mx_sdk_vm_impl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/mx.sdk/mx_sdk_vm_impl.py b/sdk/mx.sdk/mx_sdk_vm_impl.py index 607f1a2c0707..ef94a1db79eb 100644 --- a/sdk/mx.sdk/mx_sdk_vm_impl.py +++ b/sdk/mx.sdk/mx_sdk_vm_impl.py @@ -2031,13 +2031,13 @@ def _get_extra_jvm_args(): extra_jvm_args = mx.list_to_cmd_line(image_config.extra_jvm_args) if not _jlink_libraries() and _src_jdk_version >= 9: if mx.is_windows(): - extra_jvm_args = ' '.join([extra_jvm_args, r"--upgrade-module-path %location%\..\..\jvmci\graal.jar", - r"--add-modules org.graalvm.truffle,org.graalvm.sdk", - r"--module-path %location%\..\..\truffle\truffle-api.jar:%location%\..\..\jvmci\graal-sdk.jar"]) + extra_jvm_args = ' '.join([extra_jvm_args, r'--upgrade-module-path "%location%\..\..\jvmci\graal.jar"', + r'--add-modules org.graalvm.truffle,org.graalvm.sdk', + r'--module-path "%location%\..\..\truffle\truffle-api.jar:%location%\..\..\jvmci\graal-sdk.jar"']) else: - extra_jvm_args = ' '.join([extra_jvm_args, "--upgrade-module-path ${location}/../../jvmci/graal.jar", - "--add-modules org.graalvm.truffle,org.graalvm.sdk", - "--module-path ${location}/../../truffle/truffle-api.jar:${location}/../../jvmci/graal-sdk.jar"]) + extra_jvm_args = ' '.join([extra_jvm_args, '--upgrade-module-path "${location}/../../jvmci/graal.jar"', + '--add-modules org.graalvm.truffle,org.graalvm.sdk', + '--module-path "${location}/../../truffle/truffle-api.jar:${location}/../../jvmci/graal-sdk.jar"']) return extra_jvm_args def _get_option_vars():