-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 rust specific features to print target features #73346
Conversation
`crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/rustllvm/PassWrapper.cpp
Outdated
@@ -425,6 +425,9 @@ extern "C" void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef TM) { | |||
for (auto &Feature : FeatTable) | |||
printf(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc); | |||
printf("\n"); | |||
// Rust specific target features |
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.
If we're going to have this block separated by an empty line, perhaps it should print a new header too, like "Rust-specific features:".
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.
thanks, makes sense. done
src/rustllvm/PassWrapper.cpp
Outdated
@@ -424,6 +424,12 @@ extern "C" void LLVMRustPrintTargetFeatures(LLVMTargetMachineRef TM) { | |||
printf("Available features for this target:\n"); | |||
for (auto &Feature : FeatTable) | |||
printf(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc); | |||
printf("Rust-specific features:\n"); |
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.
Sorry to keep nit-picking, but I think we should still have a blank line between the sections too.
printf("Rust-specific features:\n"); | |
printf("\nRust-specific features:\n"); |
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.
alright, done
Separate target features from rust ones with a blank line Co-authored-by: Josh Stone <cuviper@gmail.com>
@bors r+ rollup |
📌 Commit caffb28 has been approved by |
Add rust specific features to print target features Fixes rust-lang#71583 `crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there so that it shows under `rustc --print target-features`. Probably the most native implementation I could think of, would love to get feedback.
Add rust specific features to print target features Fixes rust-lang#71583 `crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there so that it shows under `rustc --print target-features`. Probably the most native implementation I could think of, would love to get feedback.
Add rust specific features to print target features Fixes rust-lang#71583 `crt-static` is a rust specific target feature that's absent from llvm feature table, adding it there so that it shows under `rustc --print target-features`. Probably the most native implementation I could think of, would love to get feedback.
Rollup of 13 pull requests Successful merges: - rust-lang#70740 (Enabling static-pie for musl) - rust-lang#72331 (Report error when casting an C-like enum implementing Drop) - rust-lang#72486 (Fix asinh of negative values) - rust-lang#72497 (tag/niche terminology cleanup) - rust-lang#72999 (Create self-contained directory and move there some of external binaries/libs) - rust-lang#73130 (Remove const prop for indirects) - rust-lang#73142 (Ensure std benchmarks get tested.) - rust-lang#73305 (Disallow loading crates with non-ascii identifier name.) - rust-lang#73346 (Add rust specific features to print target features) - rust-lang#73362 (Test that bounds checks are elided when slice len is checked up-front) - rust-lang#73459 (Reduce pointer casts in Box::into_boxed_slice) - rust-lang#73464 (Document format correction) - rust-lang#73479 (Minor tweaks to liballoc) Failed merges: r? @ghost
Fixes #71583
crt-static
is a rust specific target feature that's absent from llvm feature table, adding it there so that it shows underrustc --print target-features
.Probably the most native implementation I could think of, would love to get feedback.