Struct rustc_trans::back::archive::ArchiveBuilder [−] [src]

#[must_use = "must call build() to finish building the archive"]
pub struct ArchiveBuilder<'a> {
    // some fields omitted
}
Unstable

Helper for adding many files to an archive with a single invocation of ar.

Methods

impl<'a> ArchiveBuilder<'a>

fn create(config: ArchiveConfig<'a>) -> ArchiveBuilder<'a>

Unstable

Create a new static archive, ready for adding files.

fn add_native_library(&mut self, name: &str) -> Result<(), Error>

Unstable

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) -> Result<(), Error>

Unstable

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) -> Result<(), Error>

Unstable

Adds an arbitrary file to this archive

fn update_symbols(&mut self)

Unstable

Indicate that the next call to build should updates all symbols in the archive (run 'ar s' over it).

fn build(self) -> Archive<'a>

Unstable

Combine the provided files, rlibs, and native libraries into a single Archive.