Struct rustc::back::archive::Archive[src]

pub struct Archive<'a> {
    // some fields omitted
}

Methods

impl<'a> Archive<'a>

fn create<'b>(sess: &'a Session, dst: &'b Path, initial_object: &'b Path) -> Archive<'a>

Initializes a new static archive with the given object file

fn open(sess: &'a Session, dst: Path) -> Archive<'a>

Opens an existing static archive

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, has_symbols: bool)

Adds an arbitrary file to this archive

fn remove_file(&mut self, file: &str)

Removes a file from this archive

fn update_symbols(&mut self)

Updates all symbols in the archive (runs 'ar s' over it)

fn files(&self) -> Vec<String>

Lists all files in an archive