]> git.lizzy.rs Git - rust.git/blob - src/doc/unstable-book/src/language-features/native-link-modifiers-verbatim.md
02bd87e50956d4ee83acec6e389a63e83513e4a2
[rust.git] / src / doc / unstable-book / src / language-features / native-link-modifiers-verbatim.md
1 # `native_link_modifiers_verbatim`
2
3 The tracking issue for this feature is: [#81490]
4
5 [#81490]: https://github.com/rust-lang/rust/issues/81490
6
7 ------------------------
8
9 The `native_link_modifiers_verbatim` feature allows you to use the `verbatim` modifier.
10
11 `+verbatim` means that rustc itself won't add any target-specified library prefixes or suffixes (like `lib` or `.a`) to the library name, and will try its best to ask for the same thing from the linker.
12
13 For `ld`-like linkers rustc will use the `-l:filename` syntax (note the colon) when passing the library, so the linker won't add any prefixes or suffixes as well.
14 See [`-l namespec`](https://sourceware.org/binutils/docs/ld/Options.html) in ld documentation for more details.
15 For linkers not supporting any verbatim modifiers (e.g. `link.exe` or `ld64`) the library name will be passed as is.
16
17 The default for this modifier is `-verbatim`.
18
19 This RFC changes the behavior of `raw-dylib` linking kind specified by [RFC 2627](https://github.com/rust-lang/rfcs/pull/2627). The `.dll` suffix (or other target-specified suffixes for other targets) is now added automatically.
20 If your DLL doesn't have the `.dll` suffix, it can be specified with `+verbatim`.