3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #178280 from veprbl/pr/ccache_clang_fix

cc-wrapper: disable response files for ccache
This commit is contained in:
Kira Bruneau 2023-04-15 06:47:01 -04:00 committed by GitHub
commit 99a95083df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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
@ -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"
}

View file

@ -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 ];