Skip to content

Commit

Permalink
Merge pull request #178280 from veprbl/pr/ccache_clang_fix
Browse files Browse the repository at this point in the history
cc-wrapper: disable response files for ccache
  • Loading branch information
kira-bruneau authored Apr 15, 2023
2 parents cce076b + daa77ca commit 99a9508
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
, propagateDoc ? cc != null && cc ? man
, extraTools ? [], extraPackages ? [], extraBuildCommands ? ""
, nixSupport ? {}
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
, isGNU ? false, isClang ? cc.isClang or false, isCcache ? cc.isCcache or false, gnugrep ? null
, buildPackages ? {}
, libcxx ? null
, grossHackForStagingNext ? false
Expand Down Expand Up @@ -208,7 +208,7 @@ stdenv.mkDerivation {
local dst="$1"
local wrapper="$2"
export prog="$3"
export use_response_file_by_default=${if isClang then "1" else "0"}
export use_response_file_by_default=${if isClang && !isCcache then "1" else "0"}
substituteAll "$wrapper" "$out/bin/$dst"
chmod +x "$out/bin/$dst"
}
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/tools/misc/ccache/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru = {
isClang = unwrappedCC.isClang or false;
isGNU = unwrappedCC.isGNU or false;
isCcache = true;
};
inherit (unwrappedCC) lib;
nativeBuildInputs = [ makeWrapper ];
Expand Down

0 comments on commit 99a9508

Please sign in to comment.