llvmPackages_{10,11}.compiler-rt: restrict build to current arch

Workaround for build failure after adding mandatory -arch
argument. Nixpkgs targets a single architecture, so this saves a small
amount of wasted build effort.

See https://github.com/NixOS/nixpkgs/pull/114817#issuecomment-802709527
This commit is contained in:
Andrew Childs
2021-03-19 20:23:24 +00:00
committed by github-actions[bot]
parent 8cc0010f0c
commit 2a588dad4e
2 changed files with 2 additions and 0 deletions
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals (stdenv.isDarwin) [
"-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
"-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"