Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same #172962

Merged
merged 1 commit into from
May 25, 2022

Conversation

Artturin
Copy link
Member

@Artturin Artturin commented May 14, 2022

when enableParallelBuildingByDefault is enabled

verified with
nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: stdenv Standard environment label May 14, 2022
@Artturin Artturin changed the title stdenv/linux: define enableParallelBuilding to lessen the rebuild amount treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same May 14, 2022
@Artturin Artturin requested a review from Mindavi May 14, 2022 13:10
@Artturin Artturin marked this pull request as draft May 14, 2022 15:55
@Artturin
Copy link
Member Author

compiled up to sway with 24 cores

currently compiling with 40 cores

@Artturin
Copy link
Member Author

Artturin commented May 14, 2022

compiled up to sway with 40 cores

@ofborg build sway

@Artturin
Copy link
Member Author

Artturin commented May 15, 2022

Derivations which use meson or cmake or ninja also need to have this set explicitly for nix to not change the hashes

A proper solution would be to add the attr when meson or cmake or ninja are in nativeBuildInputs

@Mindavi
Copy link
Contributor

Mindavi commented May 15, 2022

Sounds good to me, but I think @SuperSandro2000 was removing / suggesting to remove these when a builder that enabled it by default (e.g. indeed cmake or meson) was used. So not sure if we should reintroduce them again. Adding for bootstrap packages is a good idea in general though.

@SuperSandro2000
Copy link
Member

was removing / suggesting to remove these when a builder that enabled it by default (e.g. indeed cmake or meson) was used.

Yes but it should hopefully be a no-op when config.enableParallelBuildingByDefault is set and cmake/meson is used. If not I think we should fix that.

@Artturin Artturin marked this pull request as ready for review May 19, 2022 22:53
@Artturin
Copy link
Member Author

removed the commit which adds it to more packages so now its only the bootstrap packages up to bash

@Mindavi
Copy link
Contributor

Mindavi commented May 20, 2022

Hopefully these packages all support that well enough to not cause regressions. I'm expecting that your experiments would've shown the worst offenders already, so I think it's good.

@siraben
Copy link
Member

siraben commented May 24, 2022

@Artturin please resolve the merge conflict.

…s stay the same

when enableParallelBuildingByDefault is enabled

verified with
`nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
@siraben siraben merged commit b20b6fa into NixOS:staging May 25, 2022
@Artturin Artturin deleted the defaultparallelnorebuild branch May 25, 2022 19:30
@SuperSandro2000
Copy link
Member

@ofborg build pkg-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants