mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-08 05:27:57 +03:00
llvmPackages_14: Add -lgcc to NIX_LDFLAGS to lld, lldb, llvm, compiler-rt and clang
This is required to workaround #201254.
This commit is contained in:
parent
7496574169
commit
38c793c1de
@ -26,6 +26,9 @@ let
|
||||
|
||||
buildInputs = [ libxml2 libllvm ];
|
||||
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/201254
|
||||
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_CXX_FLAGS=-std=c++14"
|
||||
"-DCLANGD_BUILD_XPC=OFF"
|
||||
|
@ -35,6 +35,9 @@ stdenv.mkDerivation {
|
||||
"-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
|
||||
];
|
||||
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/201254
|
||||
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
|
@ -34,6 +34,9 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libllvm libxml2 ];
|
||||
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/201254
|
||||
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;
|
||||
|
||||
cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
||||
];
|
||||
|
@ -86,6 +86,9 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/201254
|
||||
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}"
|
||||
"-DLLVM_ENABLE_RTTI=OFF"
|
||||
|
@ -129,6 +129,9 @@ in stdenv.mkDerivation (rec {
|
||||
# E.g. mesa.drivers use the build-id as a cache key (see #93946):
|
||||
LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
|
||||
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/201254
|
||||
NIX_LDFLAGS = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then "-lgcc" else null;
|
||||
|
||||
cmakeFlags = with stdenv; let
|
||||
# These flags influence llvm-config's BuildVariables.inc in addition to the
|
||||
# general build. We need to make sure these are also passed via
|
||||
|
Loading…
Reference in New Issue
Block a user