Skip to content

Commit b17be54

Browse files
authored
Merge pull request #1299 from petrochenkov/stabverb
Document native library modifier `verbatim`
2 parents c7a39ca + 0ec6d52 commit b17be54

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/items/external-blocks.md

+17
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,22 @@ The default for this modifier is `-whole-archive`.
201201
More implementation details about this modifier can be found in
202202
[`whole-archive` documentation for rustc].
203203

204+
### Linking modifiers: `verbatim`
205+
206+
This modifier is compatible with all linking kinds.
207+
208+
`+verbatim` means that rustc itself won't add any target-specified library prefixes or suffixes
209+
(like `lib` or `.a`) to the library name, and will try its best to ask for the same thing from the
210+
linker.
211+
212+
`-verbatim` means that rustc will either add a target-specific prefix and suffix to the library
213+
name before passing it to linker, or won't prevent linker from implicitly adding it.
214+
215+
The default for this modifier is `-verbatim`.
216+
217+
More implementation details about this modifier can be found in
218+
[`verbatim` documentation for rustc].
219+
204220
#### `dylib` versus `raw-dylib`
205221

206222
On Windows, linking against a dynamic library requires that an import library
@@ -288,4 +304,5 @@ restrictions as [regular function parameters].
288304
[regular function parameters]: functions.md#attributes-on-function-parameters
289305
[`bundle` documentation for rustc]: ../../rustc/command-line-arguments.html#linking-modifiers-bundle
290306
[`whole-archive` documentation for rustc]: ../../rustc/command-line-arguments.html#linking-modifiers-whole-archive
307+
[`verbatim` documentation for rustc]: ../../rustc/command-line-arguments.html#linking-modifiers-verbatim
291308
[`dylib` versus `raw-dylib`]: #dylib-versus-raw-dylib

0 commit comments

Comments
 (0)