Skip to content

Comments

cctools: support LTO on Darwin#46730

Merged
copumpkin merged 1 commit intoNixOS:stagingfrom
copumpkin:add-darwin-lto
Sep 17, 2018
Merged

cctools: support LTO on Darwin#46730
copumpkin merged 1 commit intoNixOS:stagingfrom
copumpkin:add-darwin-lto

Conversation

@copumpkin
Copy link
Member

LTO is disabled during bootstrap to keep the bootstrap tools small and avoid unnecessary LLVM rebuilds, but is enabled in the final stdenv stage and should be usable by normal packages.

Motivation for this change

Enables better optimization if packages want it. Also, why not? 😄

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

LTO is disabled during bootstrap to keep the bootstrap tools small and
avoid unnecessary LLVM rebuilds, but is enabled in the final stdenv
stage and should be usable by normal packages.
@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Sep 16, 2018
@copumpkin
Copy link
Member Author

Once I get Hydra to build this, I'll make a third commit switching the bootstrap tools package, and then we'll be all set.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: stdenv Standard environment 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Sep 16, 2018
@copumpkin
Copy link
Member Author

@dipinhora it turns out we got rid of a lot of the annoying rpath stuff since your PR, so it got quite a bit simpler. Unlike your PR, I haven't touched the myriad LLVM versions yet; I was trying to keep the change small. I'll probably make a follow-up PR fixing up the other LLVMs at some point. Feedback welcome! Also, thanks you for your old PR and sorry it took us so long to get around to this, even if we're not using your literal diffs.

@copumpkin
Copy link
Member Author

This seems pretty low-risk so I might go ahead and merge in the next hour or so if nobody objects

@copumpkin copumpkin merged commit 481dd45 into NixOS:staging Sep 17, 2018
@copumpkin
Copy link
Member Author

Thanks!

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

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants