aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix
index 89f25cad2c54..8bd61f5d7f70 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix
@@ -41,6 +41,11 @@ stdenv.mkDerivation {
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
] ++ stdenv.lib.optionals (bareMetal) [
"-DCOMPILER_RT_OS_DIR=baremetal"
+ ] ++ stdenv.lib.optionals (stdenv.hostPlatform.isDarwin) [
+ # The compiler-rt build infrastructure sniffs supported platforms on Darwin
+ # 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.parsed.cpu.name}"
];
outputs = [ "out" "dev" ];