diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-11-09 16:07:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 16:07:25 +0100 |
commit | c17ba56fe923f649d8802777c586f61f8b8c4ad0 (patch) | |
tree | 9ec8d344f60178405c3eeead456d7d0a7904b112 | |
parent | 2d73797da48f676717877fea6dfe4468f15d2413 (diff) | |
parent | f116095a1551a89fe742f4af892c9d5e3143f812 (diff) | |
download | nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.tar nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.tar.gz nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.tar.bz2 nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.tar.lz nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.tar.xz nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.tar.zst nixpkgs-c17ba56fe923f649d8802777c586f61f8b8c4ad0.zip |
Merge pull request #266321 from lilyinstarlight/fix/llvm-16-wasi
[staging-next] llvmPackages: 12 -> 16 on wasm
-rw-r--r-- | pkgs/development/compilers/llvm/15/default.nix | 34 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/16/default.nix | 34 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 45 insertions, 25 deletions
diff --git a/pkgs/development/compilers/llvm/15/default.nix b/pkgs/development/compilers/llvm/15/default.nix index 863d31874ec..6a3b8cbabab 100644 --- a/pkgs/development/compilers/llvm/15/default.nix +++ b/pkgs/development/compilers/llvm/15/default.nix @@ -266,11 +266,13 @@ in let targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; - nixSupport.cc-cflags = [ - "-rtlib=compiler-rt" - "-B${targetLlvmLibraries.compiler-rt}/lib" - "-nostdlib++" - ]; + nixSupport.cc-cflags = + [ + "-rtlib=compiler-rt" + "-B${targetLlvmLibraries.compiler-rt}/lib" + "-nostdlib++" + ] + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; clangNoLibc = wrapCCWith rec { @@ -281,10 +283,12 @@ in let targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; - nixSupport.cc-cflags = [ - "-rtlib=compiler-rt" - "-B${targetLlvmLibraries.compiler-rt}/lib" - ]; + nixSupport.cc-cflags = + [ + "-rtlib=compiler-rt" + "-B${targetLlvmLibraries.compiler-rt}/lib" + ] + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; clangNoCompilerRt = wrapCCWith rec { @@ -293,16 +297,22 @@ in let bintools = bintoolsNoLibc'; extraPackages = [ ]; extraBuildCommands = mkExtraBuildCommands0 cc; - nixSupport.cc-cflags = [ "-nostartfiles" ]; + nixSupport.cc-cflags = + [ + "-nostartfiles" + ] + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; - clangNoCompilerRtWithLibc = wrapCCWith rec { + clangNoCompilerRtWithLibc = wrapCCWith (rec { cc = tools.clang-unwrapped; libcxx = null; bintools = bintools'; extraPackages = [ ]; extraBuildCommands = mkExtraBuildCommands0 cc; - }; + } // lib.optionalAttrs stdenv.targetPlatform.isWasm { + nixSupport.cc-cflags = [ "-fno-exceptions" ]; + }); }); diff --git a/pkgs/development/compilers/llvm/16/default.nix b/pkgs/development/compilers/llvm/16/default.nix index a9ffac74123..541db8c400d 100644 --- a/pkgs/development/compilers/llvm/16/default.nix +++ b/pkgs/development/compilers/llvm/16/default.nix @@ -271,11 +271,13 @@ in let targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; - nixSupport.cc-cflags = [ - "-rtlib=compiler-rt" - "-B${targetLlvmLibraries.compiler-rt}/lib" - "-nostdlib++" - ]; + nixSupport.cc-cflags = + [ + "-rtlib=compiler-rt" + "-B${targetLlvmLibraries.compiler-rt}/lib" + "-nostdlib++" + ] + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; clangNoLibc = wrapCCWith rec { @@ -286,10 +288,12 @@ in let targetLlvmLibraries.compiler-rt ]; extraBuildCommands = mkExtraBuildCommands cc; - nixSupport.cc-cflags = [ - "-rtlib=compiler-rt" - "-B${targetLlvmLibraries.compiler-rt}/lib" - ]; + nixSupport.cc-cflags = + [ + "-rtlib=compiler-rt" + "-B${targetLlvmLibraries.compiler-rt}/lib" + ] + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; clangNoCompilerRt = wrapCCWith rec { @@ -298,16 +302,22 @@ in let bintools = bintoolsNoLibc'; extraPackages = [ ]; extraBuildCommands = mkExtraBuildCommands0 cc; - nixSupport.cc-cflags = [ "-nostartfiles" ]; + nixSupport.cc-cflags = + [ + "-nostartfiles" + ] + ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; - clangNoCompilerRtWithLibc = wrapCCWith rec { + clangNoCompilerRtWithLibc = wrapCCWith (rec { cc = tools.clang-unwrapped; libcxx = null; bintools = bintools'; extraPackages = [ ]; extraBuildCommands = mkExtraBuildCommands0 cc; - }; + } // lib.optionalAttrs stdenv.targetPlatform.isWasm { + nixSupport.cc-cflags = [ "-fno-exceptions" ]; + }); # Has to be in tools despite mostly being a library, # because we use a native helper executable from a diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ecf12a0b066..ea590014e59 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16651,7 +16651,7 @@ with pkgs; else if platform.isFreeBSD then 12 else if platform.isAndroid then 12 else if platform.isLinux then 16 - else if platform.isWasm then 12 + else if platform.isWasm then 16 else 14; # We take the "max of the mins". Why? Since those are lower bounds of the # supported version set, this is like intersecting those sets and then |