Struct rustc_codegen_llvm::back::archive::LlvmArchiveBuilder [−][src]
#[must_use = "must call build() to finish building the archive"]pub struct LlvmArchiveBuilder<'a> { config: ArchiveConfig<'a>, removals: Vec<String>, additions: Vec<Addition>, should_update_symbols: bool, src_archive: Option<Option<ArchiveRO>>, }
Expand description
Helper for adding many files to an archive.
Fields
config: ArchiveConfig<'a>removals: Vec<String>additions: Vec<Addition>should_update_symbols: boolsrc_archive: Option<Option<ArchiveRO>>Implementations
impl<'a> LlvmArchiveBuilder<'a>[src]
impl<'a> LlvmArchiveBuilder<'a>[src]fn src_archive(&mut self) -> Option<&ArchiveRO>[src]
fn add_archive<F>(&mut self, archive: &Path, skip: F) -> Result<()> where
F: FnMut(&str) -> bool + 'static, [src]
F: FnMut(&str) -> bool + 'static,
fn llvm_archive_kind(&self) -> Result<ArchiveKind, &str>[src]
fn build_with_llvm(&mut self, kind: ArchiveKind) -> Result<()>[src]
Trait Implementations
impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a>[src]
impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a>[src]fn new(
sess: &'a Session,
output: &Path,
input: Option<&Path>
) -> LlvmArchiveBuilder<'a>[src]
fn new(
sess: &'a Session,
output: &Path,
input: Option<&Path>
) -> LlvmArchiveBuilder<'a>[src]Creates a new static archive, ready for modifying the archive specified
by config.
fn remove_file(&mut self, file: &str)[src]
fn remove_file(&mut self, file: &str)[src]Removes a file from this archive
fn add_native_library(&mut self, name: Symbol, verbatim: bool)[src]
fn add_native_library(&mut self, name: Symbol, verbatim: bool)[src]Adds all of the contents of a native library to this archive. This will
search in the relevant locations for a library named name.
fn add_rlib(
&mut self,
rlib: &Path,
name: &str,
lto: bool,
skip_objects: bool
) -> Result<()>[src]
fn add_rlib(
&mut self,
rlib: &Path,
name: &str,
lto: bool,
skip_objects: bool
) -> Result<()>[src]Adds all of the contents of the rlib at the specified path to this archive.
This ignores adding the bytecode from the rlib, and if LTO is enabled then the object file also isn’t added.
fn update_symbols(&mut self)[src]
fn update_symbols(&mut self)[src]Indicate that the next call to build should update all symbols in
the archive (equivalent to running ‘ar s’ over it).