Struct rustc_codegen_llvm::back::archive::LlvmArchiveBuilder [−][src]
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]
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]
fn new(
sess: &'a Session,
output: &Path,
input: Option<&Path>
) -> LlvmArchiveBuilder<'a>[src]
sess: &'a Session,
output: &Path,
input: Option<&Path>
) -> LlvmArchiveBuilder<'a>
Creates a new static archive, ready for modifying the archive specified
by config.
fn remove_file(&mut self, file: &str)[src]
Removes a file from this archive
fn src_files(&mut self) -> Vec<String>[src]
Lists all files in an archive
fn add_native_library(&mut self, name: Symbol)[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]
&mut self,
rlib: &Path,
name: &str,
lto: bool,
skip_objects: bool
) -> Result<()>
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 add_file(&mut self, file: &Path)[src]
Adds an arbitrary file to this archive
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).
fn build(self)[src]
Combine the provided files, rlibs, and native libraries into a single
Archive.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for LlvmArchiveBuilder<'a>
impl<'a> !Send for LlvmArchiveBuilder<'a>
impl<'a> !Sync for LlvmArchiveBuilder<'a>
impl<'a> Unpin for LlvmArchiveBuilder<'a>
impl<'a> !UnwindSafe for LlvmArchiveBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,