@@ -66,13 +66,11 @@ pub fn rerun_if_env_changed(key: impl AsRef<OsStr>) {
66
66
}
67
67
68
68
/// The `rustc-link-arg` instruction tells Cargo to pass the
69
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
69
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
70
70
/// supported targets (benchmarks, binaries, cdylib crates, examples, and tests).
71
71
///
72
72
/// Its usage is highly platform specific. It is useful to set the shared library
73
73
/// version or linker script.
74
- ///
75
- /// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg
76
74
#[ track_caller]
77
75
pub fn rustc_link_arg ( flag : & str ) {
78
76
if flag. contains ( [ ' ' , '\n' ] ) {
@@ -82,13 +80,11 @@ pub fn rustc_link_arg(flag: &str) {
82
80
}
83
81
84
82
/// The `rustc-link-arg-bin` instruction tells Cargo to pass the
85
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
83
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
86
84
/// the binary target with name `BIN`. Its usage is highly platform specific.
87
85
///
88
86
/// It
89
87
/// is useful to set a linker script or other linker options.
90
- ///
91
- /// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg
92
88
#[ track_caller]
93
89
pub fn rustc_link_arg_bin ( bin : & str , flag : & str ) {
94
90
if !is_ident ( bin) {
@@ -101,13 +97,11 @@ pub fn rustc_link_arg_bin(bin: &str, flag: &str) {
101
97
}
102
98
103
99
/// The `rustc-link-arg-bins` instruction tells Cargo to pass the
104
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
100
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
105
101
/// the binary target.
106
102
///
107
103
/// Its usage is highly platform specific. It is useful to set
108
104
/// a linker script or other linker options.
109
- ///
110
- /// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg
111
105
#[ track_caller]
112
106
pub fn rustc_link_arg_bins ( flag : & str ) {
113
107
if flag. contains ( [ ' ' , '\n' ] ) {
@@ -117,7 +111,7 @@ pub fn rustc_link_arg_bins(flag: &str) {
117
111
}
118
112
119
113
/// The `rustc-link-arg-tests` instruction tells Cargo to pass the
120
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
114
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
121
115
/// a tests target.
122
116
#[ track_caller]
123
117
pub fn rustc_link_arg_tests ( flag : & str ) {
@@ -128,7 +122,7 @@ pub fn rustc_link_arg_tests(flag: &str) {
128
122
}
129
123
130
124
/// The `rustc-link-arg-examples` instruction tells Cargo to pass the
131
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
125
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
132
126
/// an examples target.
133
127
#[ track_caller]
134
128
pub fn rustc_link_arg_examples ( flag : & str ) {
@@ -139,7 +133,7 @@ pub fn rustc_link_arg_examples(flag: &str) {
139
133
}
140
134
141
135
/// The `rustc-link-arg-benches` instruction tells Cargo to pass the
142
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
136
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
143
137
/// a benchmark target.
144
138
#[ track_caller]
145
139
pub fn rustc_link_arg_benches ( flag : & str ) {
@@ -371,13 +365,11 @@ pub fn rustc_env(key: &str, value: &str) {
371
365
}
372
366
373
367
/// The `rustc-cdylib-link-arg` instruction tells Cargo to pass the
374
- /// [`-C link-arg=FLAG` option][ link-arg] to the compiler, but only when building
368
+ /// [`-C link-arg=FLAG` option](https://doc.rust-lang.org/rustc/codegen-options/index.html# link-arg) to the compiler, but only when building
375
369
/// a `cdylib` library target.
376
370
///
377
371
/// Its usage is highly platform specific. It is useful
378
372
/// to set the shared library version or the runtime-path.
379
- ///
380
- /// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg
381
373
#[ track_caller]
382
374
pub fn rustc_cdylib_link_arg ( flag : & str ) {
383
375
if flag. contains ( '\n' ) {
0 commit comments