-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
tree-wide: enable LTO on Darwin #328586
tree-wide: enable LTO on Darwin #328586
Conversation
Override the configure check not to do a universal build. Using the system libmpdec is required to enable LTO on Darwin.
enable lto for nuitka
|
Thanks. I added nuitka to the tree-wide commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -10,7 +10,7 @@ | |||
# requiring to build a special variant for that software. Example: 'haproxy' | |||
, variant ? "all" | |||
, extraConfigureFlags ? [] | |||
, enableLto ? !(stdenv.isDarwin || stdenv.hostPlatform.isStatic || stdenv.cc.isClang) | |||
, enableLto ? !(stdenv.hostPlatform.isStatic || stdenv.cc.isClang) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not enabled -- wonder why it is gated on clang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t know, which is why I left that part of the condition in place. If the clang part is resolved, then Darwin should just work.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Description of changes
This PR is the second follow-up to #307880. It enables LTO in packages flagged by #19098 as well as others I could identify as having it disabled on Darwin.
I tested building Python on both aarch64- and x86_64-darwin. I also ran a
nixpkgs-review
on aarch64-darwin with the Python LTO disabled (to keep the number of changed packages manageable). Most packages built. Those that failed did not appear to be LTO-related. I have a number of PRs I will be submitting for some of those broken packages.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.