mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 02:03:21 +00:00
parent
f659bd7695
commit
c33c7c3d5f
@ -112,5 +112,8 @@ stdenv.mkDerivation {
|
|||||||
# "All of the code in the compiler-rt project is dual licensed under the MIT
|
# "All of the code in the compiler-rt project is dual licensed under the MIT
|
||||||
# license and the UIUC License (a BSD-like license)":
|
# license and the UIUC License (a BSD-like license)":
|
||||||
license = with lib.licenses; [ mit ncsa ];
|
license = with lib.licenses; [ mit ncsa ];
|
||||||
|
# compiler-rt requires a Clang stdenv on 32-bit RISC-V:
|
||||||
|
# https://reviews.llvm.org/D43106#1019077
|
||||||
|
broken = stdenv.hostPlatform.isRiscV && stdenv.hostPlatform.is32bit && !stdenv.cc.isClang;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ let
|
|||||||
|
|
||||||
compiler-rt-libc = callPackage ./compiler-rt {
|
compiler-rt-libc = callPackage ./compiler-rt {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
|
stdenv = if (stdenv.hostPlatform.useLLVM or false) || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.isRiscV && stdenv.hostPlatform.is32bit)
|
||||||
then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
|
then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
|
||||||
else stdenv;
|
else stdenv;
|
||||||
};
|
};
|
||||||
@ -240,7 +240,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
# N.B. condition is safe because without useLLVM both are the same.
|
# N.B. condition is safe because without useLLVM both are the same.
|
||||||
compiler-rt = if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
|
compiler-rt = if stdenv.hostPlatform.isAndroid || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) || (stdenv.hostPlatform.libc == "newlib")
|
||||||
then libraries.compiler-rt-libc
|
then libraries.compiler-rt-libc
|
||||||
else libraries.compiler-rt-no-libc;
|
else libraries.compiler-rt-no-libc;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user