Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 22631f7

Browse files
Avoid static linking on MacOS
1 parent 7c2ad70 commit 22631f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build-scripts/graal.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ process.on('unhandledRejection', error => {
3333
});
3434

3535
const NATIVE_IMAGE_BUILD_ARGS = [
36-
'-H:+StaticExecutableWithDynamicLibC',
3736
'-H:+ReportUnsupportedElementsAtRuntime',
3837
'-H:IncludeResourceBundles=org.kohsuke.args4j.Messages',
3938
'-H:IncludeResourceBundles=org.kohsuke.args4j.spi.Messages',
@@ -57,6 +56,11 @@ const NATIVE_IMAGE_BUILD_ARGS = [
5756
path.resolve(process.cwd(), 'compiler.jar')
5857
];
5958

59+
if (process.platform !== 'darwin') {
60+
// MacOS does not support building statically linked images
61+
NATIVE_IMAGE_BUILD_ARGS.unshift('-H:+StaticExecutableWithDynamicLibC');
62+
}
63+
6064
runCommand(`native-image${process.platform === 'win32' ? '.cmd' : ''}`, NATIVE_IMAGE_BUILD_ARGS)
6165
.catch(e => {
6266
console.error(e);

0 commit comments

Comments
 (0)