From dfba78324ec20c5bfdcf42d267581cbb06a0ca06 Mon Sep 17 00:00:00 2001 From: Danilo Ansaloni Date: Mon, 25 Mar 2024 17:40:11 +0100 Subject: [PATCH 1/3] Update mx version. --- common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.json b/common.json index 10dab63b2180..278cb3366b1b 100644 --- a/common.json +++ b/common.json @@ -4,7 +4,7 @@ "Jsonnet files should not include this file directly but use ci/common.jsonnet instead." ], - "mx_version": "7.16.3", + "mx_version": "7.18.0", "COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet", "jdks": { From 43f6cd374c6490a7e2a2af2464e8c79efc7abd01 Mon Sep 17 00:00:00 2001 From: Danilo Ansaloni Date: Mon, 25 Mar 2024 18:39:20 +0100 Subject: [PATCH 2/3] Propagate native compiler options to the native-image process. --- sdk/mx.sdk/mx_sdk_vm_impl.py | 16 +++++++++++++--- sdk/mx.sdk/suite.py | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sdk/mx.sdk/mx_sdk_vm_impl.py b/sdk/mx.sdk/mx_sdk_vm_impl.py index 0bed8d9c2f64..596a1ddff035 100644 --- a/sdk/mx.sdk/mx_sdk_vm_impl.py +++ b/sdk/mx.sdk/mx_sdk_vm_impl.py @@ -2408,12 +2408,22 @@ def _get_command_file(self): return self.subject.output_file() + '.cmd' def get_build_args(self): + experimental_build_args = [ + '-H:+GenerateBuildArtifactsFile', # generate 'build-artifacts.json' + ] + + alt_c_compiler = getattr(self.args, 'alt_cl' if mx.is_windows() else 'alt_cc') + if alt_c_compiler is not None: + experimental_build_args += ['-H:CCompilerPath=' + alt_c_compiler] + if self.args.alt_cflags is not None: + experimental_build_args += ['-H:CCompilerOption=' + self.args.alt_cflags] + if self.args.alt_ldflags is not None: + experimental_build_args += ['-H:NativeLinkerOption=' + self.args.alt_ldflags] + build_args = [ '-EJVMCI_VERSION_CHECK', # Propagate this env var when running native image from mx '--parallelism=' + str(self.parallelism), - ] + svm_experimental_options([ - '-H:+GenerateBuildArtifactsFile', # generate 'build-artifacts.json' - ]) + [ + ] + svm_experimental_options(experimental_build_args) + [ '--macro:' + GraalVmNativeProperties.macro_name(self.subject.native_image_config), # last to allow overrides ] if self.subject.native_image_config.is_polyglot: diff --git a/sdk/mx.sdk/suite.py b/sdk/mx.sdk/suite.py index 346805cb7d91..4b09f6a901e9 100644 --- a/sdk/mx.sdk/suite.py +++ b/sdk/mx.sdk/suite.py @@ -39,7 +39,7 @@ # SOFTWARE. # suite = { - "mxversion": "7.11.0", + "mxversion": "7.18.0", "name" : "sdk", "version" : "24.1.0", "release" : False, From e4f548e3630d52f56b82a4cab13d9062f85bb814 Mon Sep 17 00:00:00 2001 From: Danilo Ansaloni Date: Tue, 26 Mar 2024 14:36:31 +0100 Subject: [PATCH 3/3] CCompilerPath expects a path, not an executable that can be found in $PATH. --- sdk/mx.sdk/mx_sdk_vm_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/mx.sdk/mx_sdk_vm_impl.py b/sdk/mx.sdk/mx_sdk_vm_impl.py index 596a1ddff035..135b94761106 100644 --- a/sdk/mx.sdk/mx_sdk_vm_impl.py +++ b/sdk/mx.sdk/mx_sdk_vm_impl.py @@ -2414,7 +2414,7 @@ def get_build_args(self): alt_c_compiler = getattr(self.args, 'alt_cl' if mx.is_windows() else 'alt_cc') if alt_c_compiler is not None: - experimental_build_args += ['-H:CCompilerPath=' + alt_c_compiler] + experimental_build_args += ['-H:CCompilerPath=' + shutil.which(alt_c_compiler)] if self.args.alt_cflags is not None: experimental_build_args += ['-H:CCompilerOption=' + self.args.alt_cflags] if self.args.alt_ldflags is not None: