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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cctools: support LTO on Darwin #46730

Merged
merged 1 commit into from Sep 17, 2018
Merged

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.

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants