-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Enable link-arg
link kind inside of #[link]
attribute
#118448
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (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 (
|
Add unstable book entry |
I thought we had this ability in the past but removed it because it depends on the exact linker that is used. |
701aae9
to
9f925ec
Compare
@bjorn3 This version is an attribute version of
The portability here is relatively good because |
This comment has been minimized.
This comment has been minimized.
r=me after squashing commits into one. |
8e499f9
to
08bfe49
Compare
@bors r=petrochenkov |
@zetanumbers: 🔑 Insufficient privileges: Not in reviewers |
@bors r+ |
This comment has been minimized.
This comment has been minimized.
…trochenkov Enable `link-arg` link kind inside of `#[link]` attribute rust-lang#99427 (comment) > ... > This would help to make `link-arg` usable in `#[link]` attributes and e.g. wrap libc and libgcc into a group (*) in the libc crate like > > ``` > #[link(kind = "link-arg", name = "--start-group")] > #[link(kind = "static", name = "c")] > #[link(kind = "static", name = "gcc")] > #[link(kind = "link-arg", name = "--end-group")] > ``` > > (*) to address cyclic dependencies between them > > This is an analogue of CMake's LINKER: prefix (https://cmake.org/cmake/help/git-stage/command/target_link_options.html#handling-compiler-driver-differences), and was discussed as a possible future extension in the link modifier RFC (https://github.com/rust-lang/rfcs/blob/master/text/2951-native-link-modifiers.md#support-linkarg--string-in-addition-to-the-modifiers).
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
- Implement link-arg as an attribute - Apply suggestions from review - Co-authored-by: Vadim Petrochenkov <[email protected]> - Add unstable book entry
08bfe49
to
f7617c1
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0079625): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.048s -> 673.226s (0.18%) |
#99427 (comment)