From ef8a3d9f83bd8eb9e0815279dadac8b72661ed04 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Tue, 2 Feb 2021 20:45:15 -0800 Subject: [PATCH] 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. --- pkgs/development/compilers/llvm/11/compiler-rt.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/11/compiler-rt.nix b/pkgs/development/compilers/llvm/11/compiler-rt.nix index 091f327550b8..b3e8cb9e8288 100644 --- a/pkgs/development/compilers/llvm/11/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/11/compiler-rt.nix @@ -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"