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
Add -Z small-data-threshold #117465
base: master
Are you sure you want to change the base?
Add -Z small-data-threshold #117465
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @b-naber (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
358ff44
to
42150ae
Compare
This is a more targeted version of what I was trying to achieve with #116555 (which would add |
This comment has been minimized.
This comment has been minimized.
42150ae
to
54eada2
Compare
This comment has been minimized.
This comment has been minimized.
54eada2
to
8a6e656
Compare
This comment has been minimized.
This comment has been minimized.
8a6e656
to
9f35e5f
Compare
This comment has been minimized.
This comment has been minimized.
9511b44
to
f4f0492
Compare
f4f0492
to
aefc127
Compare
Sorry for the late reply. I think this needs an MCP before it can be merged. |
☔ The latest upstream changes (presumably #118178) made this pull request unmergeable. Please resolve the merge conflicts. |
This could be merged now. Can you rebase? |
There's still some lack of clarity on the MCP zulip stream whether this is the right way to solve the problem, versus a target feature. I'll push the rebase but it's probably best to not merge it yet. |
aefc127
to
4660911
Compare
This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a .sdata or .sbss section.
4660911
to
a618f74
Compare
OK, the conclusion on the zulip chat appeared to be that a target feature wasn't the right approach, so I think this is ready. |
@b-naber can you r+? If I understand this patch is ripe for merging. thanks. |
r? compiler-errors @bors r+ |
Can this emit (at least) warn if flag used with arch that isn't supported? |
Funny because I was going to ask the same thing, but then I removed it. Given that someone else cares about the same thing, let's implement that warning then. @bors r- |
Where would be the most appropriate place to put that check? |
Is there a way to issue a warning if a flag's value isn't used? Given the way LLVM supports small-data thresholds in two completely different ways (arg versus module flag) we'd be duplicating the arch checks if we put a warning at the top level. If we could check after the build that the flag had been used that would be less fragile. |
This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a
.sdata
or.sbss
section.