diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-03-18 11:28:05 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-03-18 11:28:05 -0400 |
commit | 99c18b34410fe7bbbe3f6417258b06a3d5e3171d (patch) | |
tree | b323bcdbe7af5af38193c5bdb199407144e5a4d6 /pkgs/development/compilers | |
parent | 783fa4616e044ca33e4841514a180ad1325b48d4 (diff) | |
download | nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.tar nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.tar.gz nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.tar.bz2 nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.tar.lz nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.tar.xz nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.tar.zst nixpkgs-99c18b34410fe7bbbe3f6417258b06a3d5e3171d.zip |
clang-*: Sync wrapping logic
We only want to refer to GCC under these conditions.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/llvm/5/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/6/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/7/default.nix | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/compilers/llvm/5/default.nix b/pkgs/development/compilers/llvm/5/default.nix index 05f4dbf6aa0..fd4aaa363bf 100644 --- a/pkgs/development/compilers/llvm/5/default.nix +++ b/pkgs/development/compilers/llvm/5/default.nix @@ -23,7 +23,7 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux '' + '' + 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 ''; in { diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix index d4745930ed3..85bb00d80c7 100644 --- a/pkgs/development/compilers/llvm/6/default.nix +++ b/pkgs/development/compilers/llvm/6/default.nix @@ -23,7 +23,7 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString stdenv.targetPlatform.isLinux '' + '' + 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 ''; in { diff --git a/pkgs/development/compilers/llvm/7/default.nix b/pkgs/development/compilers/llvm/7/default.nix index 04e1610fb79..816649e62ad 100644 --- a/pkgs/development/compilers/llvm/7/default.nix +++ b/pkgs/development/compilers/llvm/7/default.nix @@ -23,7 +23,7 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc) '' + '' + 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 ''; in { |