Trait rustc_codegen_ssa::back::linker::Linker

source ·
pub trait Linker {
Show 31 methods // Required methods fn cmd(&mut self) -> &mut Command; fn set_output_kind( &mut self, output_kind: LinkOutputKind, out_filename: &Path, ); fn link_staticlib_by_name( &mut self, name: &str, verbatim: bool, whole_archive: bool, ); fn link_staticlib_by_path(&mut self, path: &Path, whole_archive: bool); fn gc_sections(&mut self, keep_metadata: bool); fn no_gc_sections(&mut self); fn full_relro(&mut self); fn partial_relro(&mut self); fn no_relro(&mut self); fn optimize(&mut self); fn pgo_gen(&mut self); fn control_flow_guard(&mut self); fn ehcont_guard(&mut self); fn debuginfo( &mut self, strip: Strip, natvis_debugger_visualizers: &[PathBuf], ); fn no_crt_objects(&mut self); fn no_default_libraries(&mut self); fn export_symbols( &mut self, tmpdir: &Path, crate_type: CrateType, symbols: &[String], ); fn subsystem(&mut self, subsystem: &str); fn linker_plugin_lto(&mut self); // Provided methods fn is_cc(&self) -> bool { ... } fn link_dylib_by_name( &mut self, _name: &str, _verbatim: bool, _as_needed: bool, ) { ... } fn link_dylib_by_path(&mut self, _path: &Path, _as_needed: bool) { ... } fn link_framework_by_name( &mut self, _name: &str, _verbatim: bool, _as_needed: bool, ) { ... } fn include_path(&mut self, path: &Path) { ... } fn framework_path(&mut self, _path: &Path) { ... } fn output_filename(&mut self, path: &Path) { ... } fn add_object(&mut self, path: &Path) { ... } fn add_eh_frame_header(&mut self) { ... } fn add_no_exec(&mut self) { ... } fn add_as_needed(&mut self) { ... } fn reset_per_library_state(&mut self) { ... }
}
Expand description

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

This trait is the total list of requirements needed by back::link and represents the meaning of each option being passed down. This trait is then used to dispatch on whether a GNU-like linker (generally ld.exe) or an MSVC linker (e.g., link.exe) is being used.

Required Methods§

source

fn cmd(&mut self) -> &mut Command

source

fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path)

source

fn gc_sections(&mut self, keep_metadata: bool)

source

fn no_gc_sections(&mut self)

source

fn full_relro(&mut self)

source

fn partial_relro(&mut self)

source

fn no_relro(&mut self)

source

fn optimize(&mut self)

source

fn pgo_gen(&mut self)

source

fn control_flow_guard(&mut self)

source

fn ehcont_guard(&mut self)

source

fn debuginfo(&mut self, strip: Strip, natvis_debugger_visualizers: &[PathBuf])

source

fn no_crt_objects(&mut self)

source

fn no_default_libraries(&mut self)

source

fn export_symbols( &mut self, tmpdir: &Path, crate_type: CrateType, symbols: &[String], )

source

fn subsystem(&mut self, subsystem: &str)

source

fn linker_plugin_lto(&mut self)

Provided Methods§

source

fn is_cc(&self) -> bool

source

fn include_path(&mut self, path: &Path)

source

fn framework_path(&mut self, _path: &Path)

source

fn output_filename(&mut self, path: &Path)

source

fn add_object(&mut self, path: &Path)

source

fn add_eh_frame_header(&mut self)

source

fn add_no_exec(&mut self)

source

fn add_as_needed(&mut self)

source

fn reset_per_library_state(&mut self)

Implementations§

source§

impl dyn Linker + '_

source

pub fn verbatim_args( &mut self, args: impl IntoIterator<Item: AsRef<OsStr>>, ) -> &mut Self

source

pub fn verbatim_arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self

source

pub fn cc_args( &mut self, args: impl IntoIterator<Item: AsRef<OsStr>>, ) -> &mut Self

source

pub fn cc_arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self

source§

impl dyn Linker + '_

source

pub fn take_cmd(&mut self) -> Command

Implementors§

source§

impl<'a> Linker for AixLinker<'a>

source§

impl<'a> Linker for BpfLinker<'a>

source§

impl<'a> Linker for EmLinker<'a>

source§

impl<'a> Linker for GccLinker<'a>

source§

impl<'a> Linker for L4Bender<'a>

source§

impl<'a> Linker for LlbcLinker<'a>

source§

impl<'a> Linker for MsvcLinker<'a>

source§

impl<'a> Linker for PtxLinker<'a>

source§

impl<'a> Linker for WasmLd<'a>