diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-03-17 18:03:33 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-03-17 18:04:54 +0000 |
commit | 0ebe51030f2a4482b2cc6b07fc0be1ba86d484a9 (patch) | |
tree | 60da6760e79dfcd33333cea9255185f449486158 /pkgs/build-support/cc-wrapper | |
parent | 7105890faf43d40b0cd15840fb85e0c9fe5ecdbd (diff) |
cc-wrapper: make $tool-prefixed `cpp` wrapping unconditional
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index d2a1ed39ee07f..388e546461667 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -226,12 +226,10 @@ stdenv.mkDerivation { ln -s ${targetPrefix}clang++ $out/bin/${targetPrefix}c++ fi - if [ -e $ccPath/cpp ]; then - wrap ${targetPrefix}cpp $wrapper $ccPath/cpp - '' + lib.optionalString (hostPlatform != targetPlatform) '' - elif [ -e $ccPath/${targetPrefix}cpp ]; then + if [ -e $ccPath/${targetPrefix}cpp ]; then wrap ${targetPrefix}cpp $wrapper $ccPath/${targetPrefix}cpp - '' + '' + elif [ -e $ccPath/cpp ]; then + wrap ${targetPrefix}cpp $wrapper $ccPath/cpp fi '' |