You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an opening of a very likely very short design discussion for #81490.
Hi @petrochenkov, thanks so much for pushing for this! I just filed bazelbuild/rules_rust#637 to document what and why we need to be able to link mixed C++/Rust binaries with rustc as the linker driver. I believe what you propose will solve all our problems, but just to be sure I'd like to reiterate:
we'd like to control bundling (whether or not a library is wrapped in --whole-archive/--no-whole-archive
we'd like to be able to pass --start-lib/--end-lib with object files instead of a static archive. I believe we will be able to do that using --codegen=link-arg after the proposed change to keep relative order of -l: flags and --codegen=link-arg respected
we'd like to pass libraries verbatim
My questions:
Do all 3 points make sense to you and do you agree that native_link_modifiers aim to solve them?
Do you have a timeline in which this could be implemented? Do you seek contributions for this effort?
Thank you!
The text was updated successfully, but these errors were encountered:
Do all 3 points make sense to you and do you agree that native_link_modifiers aim to solve them?
Yes, all 3 points make sense to me and they (together with static-nobundle) are the main reasons why the RFC was written.
Do you have a timeline in which this could be implemented?
Implementation effort required to support all the parts of the RFC is relatively small, or at least not large.
Someone just needs to focus on it and do the work, I've been unable to do that in the recent months due to other tasks.
Do you seek contributions for this effort?
Yes!
Submitting a PR with some working prototype would be enough for a start, I'll be able to review and give feedback on it after that.
The work can clearly be split into orthogonal parts, which may be easier for both implementation and review.
Preserving relative order of -l and -Clink-arg(s).
Supporting the modifier syntax at command line.
Supporting the modifier syntax in attributes.
Supporting specific modifiers, all can be done independently.
For each item I can provide a starting point to read-understand-modify the code from, if necessary.
This is an opening of a very likely very short design discussion for #81490.
Hi @petrochenkov, thanks so much for pushing for this! I just filed bazelbuild/rules_rust#637 to document what and why we need to be able to link mixed C++/Rust binaries with
rustc
as the linker driver. I believe what you propose will solve all our problems, but just to be sure I'd like to reiterate:--whole-archive
/--no-whole-archive
--start-lib
/--end-lib
with object files instead of a static archive. I believe we will be able to do that using--codegen=link-arg
after the proposed change to keep relative order of-l:
flags and--codegen=link-arg
respectedMy questions:
native_link_modifiers
aim to solve them?Thank you!
The text was updated successfully, but these errors were encountered: