mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
f7617c1cd4
- Implement link-arg as an attribute - Apply suggestions from review - Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> - Add unstable book entry
13 lines
428 B
Rust
13 lines
428 B
Rust
#![feature(link_arg_attribute)]
|
|
|
|
#[link(kind = "static", name = "l1")]
|
|
#[cfg_attr(feature = "verbatim", link(kind = "link-arg", name = "a1", modifiers = "+verbatim"))]
|
|
#[cfg_attr(not(feature = "verbatim"), link(kind = "link-arg", name = "a1"))]
|
|
#[link(kind = "static", name = "l2")]
|
|
#[link(kind = "link-arg", name = "a2")]
|
|
#[link(kind = "dylib", name = "d1")]
|
|
#[link(kind = "link-arg", name = "a3")]
|
|
extern "C" {}
|
|
|
|
fn main() {}
|