Skip to content

Commit b6a0d9e

Browse files
committed
Additional notes to link-args
1 parent a8a49fb commit b6a0d9e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/doc/trpl/advanced-linking.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ extern {}
2222

2323
Note that this feature is currently hidden behind the `feature(link_args)` gate
2424
because this is not a sanctioned way of performing linking. Right now `rustc`
25-
shells out to the system linker, so it makes sense to provide extra command line
25+
shells out to the system linker (`gcc` on most systems, `link.exe` on MSVC),
26+
so it makes sense to provide extra command line
2627
arguments, but this will not always be the case. In the future `rustc` may use
2728
LLVM directly to link native libraries, in which case `link_args` will have no
28-
meaning.
29+
meaning. You can achieve the same effect as the `link-args` attribute with the
30+
`-C link-args` argument to `rustc`.
2931

3032
It is highly recommended to *not* use this attribute, and rather use the more
3133
formal `#[link(...)]` attribute on `extern` blocks instead.

0 commit comments

Comments
 (0)