mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
ccache.links: make it a function of unwrappedCC
That way we can use a ccacheStdenv with e.g. a different CC: stdenv = overrideCC gcc8Stdenv (ccacheWrapper.override { unwrappedCC = gcc8Stdenv.cc.cc; });
This commit is contained in:
parent
2d5769884d
commit
594ca3f1cf
@ -27,12 +27,10 @@ let ccache = stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
passthru = let
|
||||
unwrappedCC = stdenv.cc.cc;
|
||||
in {
|
||||
passthru = {
|
||||
# A derivation that provides gcc and g++ commands, but that
|
||||
# will end up calling ccache for the given cacheDir
|
||||
links = extraConfig: stdenv.mkDerivation rec {
|
||||
links = {unwrappedCC, extraConfig}: stdenv.mkDerivation rec {
|
||||
name = "ccache-links";
|
||||
passthru = {
|
||||
isClang = unwrappedCC.isClang or false;
|
||||
|
@ -9009,8 +9009,8 @@ in
|
||||
# };
|
||||
# You can use a different directory, but whichever directory you choose
|
||||
# should be owned by user root, group nixbld with permissions 0770.
|
||||
ccacheWrapper = makeOverridable ({ extraConfig ? "" }:
|
||||
wrapCC (ccache.links extraConfig)) {};
|
||||
ccacheWrapper = makeOverridable ({ extraConfig ? "", unwrappedCC ? stdenv.cc.cc }:
|
||||
wrapCC (ccache.links {inherit unwrappedCC extraConfig;})) {};
|
||||
ccacheStdenv = lowPrio (overrideCC stdenv buildPackages.ccacheWrapper);
|
||||
|
||||
cccc = callPackage ../development/tools/analysis/cccc { };
|
||||
|
Loading…
Reference in New Issue
Block a user