[−][src]Struct rustc_codegen_llvm::back::archive::LlvmArchiveBuilder

#[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>>,
}

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]

pub(in back::archive) fn src_archive(
    &mut self
) -> Option<&ArchiveRO>
[src]

pub(in back::archive) fn add_archive<F>(
    &mut self,
    archive: &Path,
    skip: F
) -> Result<()> where
    F: FnMut(&str) -> bool + 'static, 
[src]

pub(in back::archive) fn llvm_archive_kind(
    &self
) -> Result<ArchiveKind, &str>
[src]

pub(in back::archive) fn build_with_llvm(
    &mut self,
    kind: ArchiveKind
) -> Result<()>
[src]

Trait Implementations

impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a>[src]

pub 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.

pub fn remove_file(&mut self, file: &str)[src]

Removes a file from this archive

pub fn src_files(&mut self) -> Vec<String>[src]

Lists all files in an archive

pub 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.

pub 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.

pub fn add_file(&mut self, file: &Path)[src]

Adds an arbitrary file to this archive

pub 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).

pub 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]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.