wrapNonDeterministicGcc: override the param cc of ccWrapper instead of override drv attr env.cc

This affect the value of attr path `pkgs.fastStdenv.cc.cc.buildFlags`:
before: `[ ]`
after: `[ "profiledbootstrap" ]`

ref: c577eb6892
This commit is contained in:
n0099
2026-01-06 05:44:15 +00:00
parent 2259340fab
commit a85d008af6
+4 -6
View File
@@ -4263,12 +4263,10 @@ with pkgs;
wrapNonDeterministicGcc =
stdenv: ccWrapper:
if ccWrapper.isGNU then
ccWrapper.overrideAttrs (old: {
env = old.env // {
cc = old.env.cc.override {
reproducibleBuild = false;
profiledCompiler = with stdenv; (!isDarwin && hostPlatform.isx86);
};
ccWrapper.override (prev: {
cc = prev.cc.override {
reproducibleBuild = false;
profiledCompiler = with stdenv; (!isDarwin && hostPlatform.isx86);
};
})
else