llvmPackages_11.compiler-rt: fix build on darwin

Needed to prevent faulty i686 codegen on x86_64. We're doing this
already for the older llvm packages, so not sure why 11 never had this.
This commit is contained in:
Ryan Burns 2021-02-02 20:45:15 -08:00
parent a3a5310715
commit ef8a3d9f83

View file

@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
"-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
] ++ lib.optionals (stdenv.isDarwin) [
"-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"