llvmPackages.clangUseLLVM: add --undefined-version by default

Majority of packages with a version script have broken version scripts,
this will likely result in us adding this flag to many packages. To keep
things simple, just add it as a default.
This commit is contained in:
Tristan Ross 2024-07-26 21:11:17 -07:00
parent b11f469249
commit 019d091938
No known key found for this signature in database
GPG Key ID: B09C422035669AF8

View File

@ -439,7 +439,8 @@ let
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
nixSupport.cc-ldflags = lib.optionals (
!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD
) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
) [ "-L${targetLlvmLibraries.libunwind}/lib" ]
++ lib.optional (lib.versionAtLeast metadata.release_version "17") "--undefined-version";
}
);
@ -619,6 +620,7 @@ let
compiler-rt-no-libc = callPackage ./compiler-rt {
patches = compiler-rtPatches;
doFakeLibgcc = stdenv.hostPlatform.useLLVM or false;
stdenv =
if stdenv.hostPlatform.useLLVM or false then
overrideCC stdenv buildLlvmTools.clangNoCompilerRt