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:40:34 +09:00 committed by github-actions[bot]
parent 8cc0010f0c
commit 2a588dad4e
2 changed files with 2 additions and 0 deletions

View file

@ -46,6 +46,7 @@ stdenv.mkDerivation rec {
# and finds i386;x86_64;x86_64h. We only build for x86_64, so linking fails
# when it tries to use libc++ and libc++api for i386.
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
"-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
];
outputs = [ "out" "dev" ];

View file

@ -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"