Struct rustc_codegen_ssa::back::linker::GccLinker
source · pub struct GccLinker<'a> {
cmd: Command,
sess: &'a Session,
target_cpu: &'a str,
hinted_static: Option<bool>,
is_ld: bool,
is_gnu: bool,
}
Fields§
§cmd: Command
§sess: &'a Session
§target_cpu: &'a str
§hinted_static: Option<bool>
§is_ld: bool
§is_gnu: bool
Implementations§
source§impl<'a> GccLinker<'a>
impl<'a> GccLinker<'a>
sourcefn linker_arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self
fn linker_arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self
Passes an argument directly to the linker.
When the linker is not ld-like such as when using a compiler as a linker, the argument is
prepended by -Wl,
.
sourcefn linker_args(&mut self, args: &[impl AsRef<OsStr>]) -> &mut Self
fn linker_args(&mut self, args: &[impl AsRef<OsStr>]) -> &mut Self
Passes a series of arguments directly to the linker.
When the linker is ld-like, the arguments are simply appended to the command. When the
linker is not ld-like such as when using a compiler as a linker, the arguments are joined by
commas to form an argument that is then prepended with -Wl
. In this situation, only a
single argument is appended to the command to ensure that the order of the arguments is
preserved by the compiler.
fn takes_hints(&self) -> bool
fn hint_static(&mut self)
fn hint_dynamic(&mut self)
fn push_linker_plugin_lto_args(&mut self, plugin_path: Option<&OsStr>)
fn build_dylib(&mut self, out_filename: &Path)
Trait Implementations§
source§impl<'a> Linker for GccLinker<'a>
impl<'a> Linker for GccLinker<'a>
fn cmd(&mut self) -> &mut Command
fn set_output_kind(&mut self, output_kind: LinkOutputKind, out_filename: &Path)
fn link_dylib(&mut self, lib: &str, verbatim: bool, as_needed: bool)
fn link_staticlib(&mut self, lib: &str, verbatim: bool)
fn link_rlib(&mut self, lib: &Path)
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 full_relro(&mut self)
fn partial_relro(&mut self)
fn no_relro(&mut self)
fn link_rust_dylib(&mut self, lib: &str, _path: &Path)
fn link_framework(&mut self, framework: &str, as_needed: bool)
fn link_whole_staticlib( &mut self, lib: &str, verbatim: bool, search_path: &[PathBuf] )
fn link_whole_rlib(&mut self, lib: &Path)
fn gc_sections(&mut self, keep_metadata: bool)
fn no_gc_sections(&mut self)
fn optimize(&mut self)
fn pgo_gen(&mut self)
fn control_flow_guard(&mut self)
fn debuginfo(&mut self, strip: Strip, _: &[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 reset_per_library_state(&mut self)
fn linker_plugin_lto(&mut self)
fn add_eh_frame_header(&mut self)
fn add_no_exec(&mut self)
fn add_as_needed(&mut self)
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GccLinker<'a>
impl<'a> !Send for GccLinker<'a>
impl<'a> !Sync for GccLinker<'a>
impl<'a> Unpin for GccLinker<'a>
impl<'a> !UnwindSafe for GccLinker<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes