diff options
Diffstat (limited to 'nixpkgs/pkgs/development')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/llvm/11/default.nix | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix index 2aefc884d48e..4f5e20cfe770 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/clang/default.nix @@ -86,8 +86,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = { diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/default.nix b/nixpkgs/pkgs/development/compilers/llvm/11/default.nix index 0b091c60973a..a404d1606957 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/default.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -25,8 +26,8 @@ let ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -60,7 +61,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; |