llvm/7/compiler-rt: define CMAKE_*_COMPILER_TARGET unconditionally
When building with -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON the compiler-rt CMake configuration attempts to use CMAKE_*_COMPILER_TARGET variables, which are usually only defined in cross-compilation mode.
This commit is contained in:
parent
83c92d8215
commit
7541e4f8ac
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
|
||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-DCMAKE_C_FLAGS=-nodefaultlibs"
|
||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||
@ -17,8 +19,6 @@ stdenv.mkDerivation rec {
|
||||
"-DCOMPILER_RT_BUILD_XRAY=OFF"
|
||||
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
|
||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||
"-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
|
||||
"-DCOMPILER_RT_BAREMETAL_BUILD=ON"
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user