diff --git a/build-scripts/graal.js b/build-scripts/graal.js index bfa020f..738f1da 100755 --- a/build-scripts/graal.js +++ b/build-scripts/graal.js @@ -33,7 +33,6 @@ process.on('unhandledRejection', error => { }); const NATIVE_IMAGE_BUILD_ARGS = [ - '-H:+StaticExecutableWithDynamicLibC', '-H:+ReportUnsupportedElementsAtRuntime', '-H:IncludeResourceBundles=org.kohsuke.args4j.Messages', '-H:IncludeResourceBundles=org.kohsuke.args4j.spi.Messages', @@ -57,6 +56,11 @@ const NATIVE_IMAGE_BUILD_ARGS = [ path.resolve(process.cwd(), 'compiler.jar') ]; +if (process.platform !== 'darwin') { + // MacOS does not support building statically linked images + NATIVE_IMAGE_BUILD_ARGS.unshift('-H:+StaticExecutableWithDynamicLibC'); +} + runCommand(`native-image${process.platform === 'win32' ? '.cmd' : ''}`, NATIVE_IMAGE_BUILD_ARGS) .catch(e => { console.error(e);