forked from mirrors/nixpkgs
llvm9/compiler-rt: fix on i686
This commit is contained in:
parent
a7dc5c685e
commit
1f95c9c933
|
@ -7,11 +7,10 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ cmake python llvm ];
|
nativeBuildInputs = [ cmake python llvm ];
|
||||||
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||||
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
||||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||||
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
|
||||||
|
@ -46,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace cmake/config-ix.cmake \
|
substituteInPlace cmake/config-ix.cmake \
|
||||||
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
|
||||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
'' + stdenv.lib.optionalString (stdenv.hostPlatform.useLLVM or false) ''
|
||||||
substituteInPlace lib/builtins/int_util.c \
|
substituteInPlace lib/builtins/int_util.c \
|
||||||
--replace "#include <stdlib.h>" ""
|
--replace "#include <stdlib.h>" ""
|
||||||
substituteInPlace lib/builtins/clear_cache.c \
|
substituteInPlace lib/builtins/clear_cache.c \
|
||||||
|
|
Loading…
Reference in a new issue