Loading pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +10 −7 Original line number Diff line number Diff line Loading @@ -137,8 +137,8 @@ let postInstall = let cLibsAsFlags = (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs); preservedNixVariables = [ cLibsFlags = (map (l: "-H:CLibraryPath=${l}/lib") cLibs); preservedNixVarFlags = [ "-ENIX_BINTOOLS" "-ENIX_BINTOOLS_WRAPPER_TARGET_HOST_${stdenv.cc.suffixSalt}" "-ENIX_BUILD_CORES" Loading @@ -161,7 +161,10 @@ let "-EMACOSX_DEPLOYMENT_TARGET_FOR_TARGET" "-ENIX_APPLE_SDK_VERSION" ]; preservedNixVariablesAsFlags = (map (f: "--add-flags '${f}'") preservedNixVariables); checkToolchainFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-H:+UnlockExperimentalVMOptions" "-H:-CheckToolchain" ]; in '' # jni.h expects jni_md.h to be in the header search path. Loading @@ -182,7 +185,7 @@ let wrapProgram $out/bin/native-image \ --prefix PATH : ${binPath} \ ${toString (cLibsAsFlags ++ preservedNixVariablesAsFlags)} --add-flags "${toString (cLibsFlags ++ preservedNixVarFlags ++ checkToolchainFlags)}" ''; preFixup = lib.optionalString (stdenv.hostPlatform.isLinux) '' Loading Loading @@ -217,14 +220,14 @@ let $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' echo "Ahead-Of-Time compilation" $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:-CheckToolchain -H:+ReportExceptionStackTraces -march=compatibility HelloWorld $out/bin/native-image -H:+ReportExceptionStackTraces -march=compatibility HelloWorld ./helloworld | fgrep 'Hello World' ${ # -H:+StaticExecutableWithDynamicLibC is only available in Linux lib.optionalString (stdenv.hostPlatform.isLinux && !useMusl) '' echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC -march=compatibility $extraNativeImageArgs HelloWorld $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC -march=compatibility HelloWorld ./helloworld | fgrep 'Hello World' '' } Loading @@ -233,7 +236,7 @@ let # --static is only available in x86_64 Linux lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 && useMusl) '' echo "Ahead-Of-Time compilation with --static and --libc=musl" $out/bin/native-image $extraNativeImageArgs -march=compatibility --libc=musl --static HelloWorld $out/bin/native-image -march=compatibility --libc=musl --static HelloWorld ./helloworld | fgrep 'Hello World' '' } Loading Loading
pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +10 −7 Original line number Diff line number Diff line Loading @@ -137,8 +137,8 @@ let postInstall = let cLibsAsFlags = (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs); preservedNixVariables = [ cLibsFlags = (map (l: "-H:CLibraryPath=${l}/lib") cLibs); preservedNixVarFlags = [ "-ENIX_BINTOOLS" "-ENIX_BINTOOLS_WRAPPER_TARGET_HOST_${stdenv.cc.suffixSalt}" "-ENIX_BUILD_CORES" Loading @@ -161,7 +161,10 @@ let "-EMACOSX_DEPLOYMENT_TARGET_FOR_TARGET" "-ENIX_APPLE_SDK_VERSION" ]; preservedNixVariablesAsFlags = (map (f: "--add-flags '${f}'") preservedNixVariables); checkToolchainFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-H:+UnlockExperimentalVMOptions" "-H:-CheckToolchain" ]; in '' # jni.h expects jni_md.h to be in the header search path. Loading @@ -182,7 +185,7 @@ let wrapProgram $out/bin/native-image \ --prefix PATH : ${binPath} \ ${toString (cLibsAsFlags ++ preservedNixVariablesAsFlags)} --add-flags "${toString (cLibsFlags ++ preservedNixVarFlags ++ checkToolchainFlags)}" ''; preFixup = lib.optionalString (stdenv.hostPlatform.isLinux) '' Loading Loading @@ -217,14 +220,14 @@ let $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' echo "Ahead-Of-Time compilation" $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:-CheckToolchain -H:+ReportExceptionStackTraces -march=compatibility HelloWorld $out/bin/native-image -H:+ReportExceptionStackTraces -march=compatibility HelloWorld ./helloworld | fgrep 'Hello World' ${ # -H:+StaticExecutableWithDynamicLibC is only available in Linux lib.optionalString (stdenv.hostPlatform.isLinux && !useMusl) '' echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC" $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC -march=compatibility $extraNativeImageArgs HelloWorld $out/bin/native-image -H:+UnlockExperimentalVMOptions -H:+StaticExecutableWithDynamicLibC -march=compatibility HelloWorld ./helloworld | fgrep 'Hello World' '' } Loading @@ -233,7 +236,7 @@ let # --static is only available in x86_64 Linux lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 && useMusl) '' echo "Ahead-Of-Time compilation with --static and --libc=musl" $out/bin/native-image $extraNativeImageArgs -march=compatibility --libc=musl --static HelloWorld $out/bin/native-image -march=compatibility --libc=musl --static HelloWorld ./helloworld | fgrep 'Hello World' '' } Loading