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 (
rustc_private
)Helper for adding many files to an archive with a single invocation of
ar
.
Methods
impl<'a> ArchiveBuilder<'a>
[src]
fn new(config: ArchiveConfig<'a>) -> ArchiveBuilder<'a>
Unstable (
rustc_private
)Create a new static archive, ready for modifying the archive specified
by config
.
fn remove_file(&mut self, file: &str)
Unstable (
rustc_private
)Removes a file from this archive
fn src_files(&mut self) -> Vec<String>
Unstable (
rustc_private
)Lists all files in an archive
fn add_native_library(&mut self, name: &str)
Unstable (
rustc_private
)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<()>
Unstable (
rustc_private
)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)
Unstable (
rustc_private
)Adds an arbitrary file to this archive
fn update_symbols(&mut self)
Unstable (
rustc_private
)Indicate that the next call to build
should updates all symbols in
the archive (run 'ar s' over it).
fn build(&mut self)
Unstable (
rustc_private
)Combine the provided files, rlibs, and native libraries into a single
Archive
.