From 0b07b7e4b7a0d6d160e8b1a2296105d1e7a8719e Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 3 Aug 2024 23:07:14 -0700 Subject: [PATCH] llvmPackages: fix wasm with common opts --- .../compilers/llvm/common/default.nix | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index ea12bace42a0..1ec50ce87db3 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -471,10 +471,12 @@ let && stdenv.targetPlatform.useLLVM or false ) "-lunwind" ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; - nixSupport.cc-ldflags = lib.optionals ( - !stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD - ) [ "-L${targetLlvmLibraries.libunwind}/lib" ] - ++ lib.optional (lib.versionAtLeast metadata.release_version "17") "--undefined-version"; + nixSupport.cc-ldflags = + lib.optionals (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD) + ( + [ "-L${targetLlvmLibraries.libunwind}/lib" ] + ++ lib.optional (lib.versionAtLeast metadata.release_version "17") "--undefined-version" + ); } ); @@ -695,13 +697,11 @@ let ./compiler-rt/armv6-scudo-no-yield.patch ./compiler-rt/armv6-scudo-libatomic.patch ] - ++ lib.optional (lib.versionAtLeast metadata.release_version "19") ( - fetchpatch { - url = "https://github.com/llvm/llvm-project/pull/99837/commits/14ae0a660a38e1feb151928a14f35ff0f4487351.patch"; - hash = "sha256-JykABCaNNhYhZQxCvKiBn54DZ5ZguksgCHnpdwWF2no="; - relative = "compiler-rt"; - } - ); + ++ lib.optional (lib.versionAtLeast metadata.release_version "19") (fetchpatch { + url = "https://github.com/llvm/llvm-project/pull/99837/commits/14ae0a660a38e1feb151928a14f35ff0f4487351.patch"; + hash = "sha256-JykABCaNNhYhZQxCvKiBn54DZ5ZguksgCHnpdwWF2no="; + relative = "compiler-rt"; + }); in { compiler-rt-libc = callPackage ./compiler-rt (