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
committed by Florian Brandes
parent 431ebe400e
commit b36092cccb

View File

@@ -473,7 +473,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";
}
);
@@ -731,6 +732,7 @@ let
compiler-rt-no-libc = callPackage ./compiler-rt {
patches = compiler-rtPatches;
doFakeLibgcc = stdenv.hostPlatform.useLLVM or false;
stdenv =
if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform then
stdenv