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

Make lto toolchain options public and don't link proc-macros with LTO #3147

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

havasd
Copy link
Contributor

@havasd havasd commented Dec 31, 2024

I would like to make lto setting public in toolchain so that when we are providing custom toolchains it would be easier to make configurations for LTO with select statements.

The logic which determines the flags based on cargo outputs.

Proc-macro crates can not be linked with lto and we should not emit bitcode either. This fixes #3143

Proc-macro crates can not be linked with lto and we should not emit bitcode either.
This fixes bazelbuild#3143
Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable! I'm not completely sure how stable the provider is going to be, but we can worry about that if we need to change it...

@illicitonion illicitonion enabled auto-merge January 2, 2025 23:29
@illicitonion illicitonion added this pull request to the merge queue Jan 2, 2025
Merged via the queue into bazelbuild:main with commit 568bb7b Jan 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lto cannot be used for proc-macro crate type without -Zdylib-lto
2 participants