rust/tests/ui/issues/issue-70093
Jeremy Fitzhardinge fc5db2cd4f Implement -Zlink-directives=yes/no
`-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.

This is another way to address issue # #70093, which is currently addressed
by `-Zlink-native-libraries` (implemented in #70095). The latter is
implemented at link time, which has the effect of ignoring `#[link]`
in *every* crate. This makes it a very large hammer as it requires all
native dependencies to be known to the build system to be at all usable,
including those in sysroot libraries. I think this means its effectively
unused, and definitely under-used.

Being able to control this on a crate-by-crate basis should make it much
easier to apply when needed.

I'm not sure if we need both mechanisms, but we can decide that later.
2023-02-22 10:18:01 -08:00
..
issue-70093-link-directives.rs Implement -Zlink-directives=yes/no 2023-02-22 10:18:01 -08:00
issue-70093.rs Implement -Zlink-directives=yes/no 2023-02-22 10:18:01 -08:00