Description
This is a tracking issue for the unstable rustc flag -Z link-directives
where
-Zlink-directives=no
will ignored#[link]
directives while compiling a crate, so nothing is emitted into the crate's metadata. The assumption is that the build system already knows about the crate's native dependencies and can provide them at link time without these directives.PR description of #107675 (comment)
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
-
Open an MCP and have it accepted.At the time of impl, there was no such requirement. - Implementation
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Missing unstable flag documentation?
- What does this unstable rustc flag
-Z link-directives
do, exactly? - How does it relate to the stable
#[link]
attribute? - What does this mean for the
#[link]
attribute (which is a stable attribute)? - How does this unstable flag relate to
-Z link-native-libraries
?
Implementation history
- Initial implementation PR: Implement -Zlink-directives=yes/no #107675