Merge pull request #332170 from ExpidusOS/fix/firefox-llvm-common-opts

llvmPackages: fix wasm with common opts
This commit is contained in:
Tristan Ross 2024-08-04 07:09:30 -07:00 committed by GitHub
commit e16b22c5da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 (