about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-30 18:09:45 +0000
committerbors <bors@rust-lang.org>2023-11-30 18:09:45 +0000
commit00796255c2796914c9640c1eef8dae522af0b8cc (patch)
tree6897c7f310d66757a9bcc9b4b28badba85d114c5 /compiler/rustc_codegen_ssa/src
parent07921b50ba6dcb5b2984a1dba039a38d85bffba2 (diff)
parentf7617c1cd4d1910613ffecdfd8de28889002f6cc (diff)
downloadrust-00796255c2796914c9640c1eef8dae522af0b8cc.tar.gz
rust-00796255c2796914c9640c1eef8dae522af0b8cc.zip
Auto merge of #118448 - ZetaNumbers:link_arg_attribute, r=petrochenkov
Enable `link-arg` link kind inside of `#[link]` attribute

https://github.com/rust-lang/rust/issues/99427#issuecomment-1234443468

> ...
> 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).
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
0 files changed, 0 insertions, 0 deletions