diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/8')
-rw-r--r-- | pkgs/development/compilers/llvm/8/clang/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/compiler-rt.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/libc++/default.nix | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index 2d7fc8068900..5c1dca5e33b1 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -20,10 +20,10 @@ let ''; nativeBuildInputs = [ cmake python3 ] - ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libxml2 llvm lld ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libxml2 llvm lld ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-std=c++11" diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index a907d4086550..3c6265c4fca0 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/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" ]; diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix index 9c0c7951c794..01e0d8e008cb 100644 --- a/pkgs/development/compilers/llvm/8/libc++/default.nix +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -25,9 +25,10 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3 + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ libcxxabi ]; cmakeFlags = [ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" |