diff options
| author | zetanumbers <dariasukhonina@gmail.com> | 2023-11-29 02:13:58 -0800 |
|---|---|---|
| committer | zetanumbers <dariasukhonina@gmail.com> | 2023-11-30 08:26:13 -0800 |
| commit | f7617c1cd4d1910613ffecdfd8de28889002f6cc (patch) | |
| tree | 0e59cdec0aa2c45e9378af5cb273d7f37aabfa28 /src | |
| parent | 1670ff64bf1ccb2ad71068254b53725631c55864 (diff) | |
| download | rust-f7617c1cd4d1910613ffecdfd8de28889002f6cc.tar.gz rust-f7617c1cd4d1910613ffecdfd8de28889002f6cc.zip | |
Enable link-arg link kind inside of #[link] attribute
- Implement link-arg as an attribute - Apply suggestions from review - Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> - Add unstable book entry
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/unstable-book/src/language-features/link-arg-attribute.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/language-features/link-arg-attribute.md b/src/doc/unstable-book/src/language-features/link-arg-attribute.md new file mode 100644 index 00000000000..09915a7f274 --- /dev/null +++ b/src/doc/unstable-book/src/language-features/link-arg-attribute.md @@ -0,0 +1,21 @@ +# `link_arg_attribute` + +The tracking issue for this feature is: [#99427] + +------ + +The `link_arg_attribute` feature allows passing arguments into the linker +from inside of the source code. Order is preserved for link attributes as +they were defined on a single extern block: + +```rust,no_run +#![feature(link_arg_attribute)] + +#[link(kind = "link-arg", name = "--start-group")] +#[link(kind = "static", name = "c")] +#[link(kind = "static", name = "gcc")] +#[link(kind = "link-arg", name = "--end-group")] +extern "C" {} +``` + +[#99427]: https://github.com/rust-lang/rust/issues/99427 |
