Struct rustc_back::archive::ArchiveBuilderUnstable [-] [+] [src]

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

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>

Create a new static archive, ready for adding files.

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

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) -> IoResult<()>

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) -> IoResult<()>

Adds an arbitrary file to this archive

fn update_symbols(&mut self)

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

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

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