Commit cfc4c957 authored by Adam Joseph's avatar Adam Joseph
Browse files

gcc: fix fastStdenv breakage from #209870

Apparently gcc has these `Makefile` targets:

- `""`
- `"bootstrap"`
- `"profiledbootstrap"`

... but no `"profiled"`.  So if you want a profiled compiler, at the
moment, it should be bootstrapped.

If we ever decide to make the nixpkgs bootstrap use a profiled
compiler (which at the moment means nondeterminism) a Nix-driven
profile loop is certainly possible, but would take some work.

Closes #228597.
parent d7d3821a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ with builtins;

let majorVersion = "12";
    version = "${majorVersion}.2.0";
    disableBootstrap = !stdenv.hostPlatform.isDarwin;
    disableBootstrap = !stdenv.hostPlatform.isDarwin && !profiledCompiler;

    inherit (stdenv) buildPlatform hostPlatform targetPlatform;

@@ -288,6 +288,8 @@ lib.pipe (stdenv.mkDerivation ({
  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;

  buildFlags =
    # we do not yet have Nix-driven profiling
    assert profiledCompiler -> !disableBootstrap;
    let target =
          lib.optionalString (profiledCompiler) "profiled" +
          lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap";