diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2022-04-08 18:20:57 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2022-06-09 23:12:58 +0400 |
| commit | a8ee1f3a4f6ee7f788ad53e28e2945e0cb7a1cce (patch) | |
| tree | 5cfc8da3609aaa072a25b4829b193b4a6f2fc876 /src/doc/rustc | |
| parent | d7b8d77be5b4a091fe99c2f32b1334b931a2f4aa (diff) | |
| download | rust-a8ee1f3a4f6ee7f788ad53e28e2945e0cb7a1cce.tar.gz rust-a8ee1f3a4f6ee7f788ad53e28e2945e0cb7a1cce.zip | |
Stabilize the `bundle` native library modifier
Diffstat (limited to 'src/doc/rustc')
| -rw-r--r-- | src/doc/rustc/src/command-line-arguments.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md index 73e7764a11d..bc04dfd4433 100644 --- a/src/doc/rustc/src/command-line-arguments.md +++ b/src/doc/rustc/src/command-line-arguments.md @@ -84,6 +84,26 @@ The default for this modifier is `-whole-archive`. \ NOTE: The default may currently be different in some cases for backward compatibility, but it is not guaranteed. If you need whole archive semantics use `+whole-archive` explicitly. +### Linking modifiers: `bundle` + +This modifier is only compatible with the `static` linking kind. +Using any other kind will result in a compiler error. + +When building a rlib or staticlib `+bundle` means that all object files from the native static +library will be added to the rlib or staticlib archive, and then used from it during linking of +the final binary. + +When building a rlib `-bundle` means that the native static library is registered as a dependency +of that rlib "by name", and object files from it are included only during linking of the final +binary, the file search by that name is also performed during final linking. \ +When building a staticlib `-bundle` means that the native static library is simply not included +into the archive and some higher level build system will need to add it later during linking of +the final binary. + +This modifier has no effect when building other targets like executables or dynamic libraries. + +The default for this modifier is `+bundle`. + <a id="option-crate-type"></a> ## `--crate-type`: a list of types of crates for the compiler to emit |
