Module linker

Source

MacrosΒ§

generate_arg_methods πŸ”’

StructsΒ§

AixLinker πŸ”’
Linker for AIX.
BpfLinker πŸ”’
EmLinker πŸ”’
GccLinker πŸ”’
L4Bender πŸ”’
Linker shepherd script for L4Re (Fiasco)
LlbcLinker πŸ”’
The self-contained LLVM bitcode linker
MsvcLinker πŸ”’
PtxLinker πŸ”’
Much simplified and explicit CLI for the NVPTX linker. The linker operates with bitcode and uses LLVM backend to generate a PTX assembly.
WasmLd πŸ”’

TraitsΒ§

Linker πŸ”’
Linker abstraction used by back::link to build up the command to invoke a linker.

FunctionsΒ§

cc_args πŸ”’
Arguments for the cc wrapper specifically. Check that it’s indeed a cc wrapper and pass verbatim.
convert_link_args_to_cc_args πŸ”’
Add underlying linker arguments to C compiler command, by wrapping them in -Wl or -Xlinker.
disable_localization πŸ”’
Disables non-English messages from localized linkers. Such messages may cause issues with text encoding on Windows (#35785) and prevent inspection of linker output in case of errors, which we occasionally do. This should be acceptable because other messages from rustc are in English anyway, and may also be desirable to improve searchability of the linker diagnostics.
exported_symbols πŸ”’
exported_symbols_for_non_proc_macro πŸ”’
exported_symbols_for_proc_macro_crate πŸ”’
for_each_exported_symbols_include_dep πŸ”’
get_linker πŸ”’
The third parameter is for env vars, used on windows to set up the path for MSVC to find its DLLs, and gcc to find its bundled toolchain
link_args πŸ”’
Arguments for the underlying linker. Add options to pass them through cc wrapper if Linker is a cc wrapper.
link_or_cc_args πŸ”’
Arguments supported by both underlying linker and cc wrapper, pass verbatim.
linked_symbols πŸ”’
verbatim_args πŸ”’
Just pass the arguments to the linker as is. It is assumed that they are correctly prepared in advance.