mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00

Sync ar_archive_writer to LLVM 18.1.3 From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
26 lines
786 B
Rust
26 lines
786 B
Rust
use std::path::{Path, PathBuf};
|
|
|
|
use rustc_codegen_ssa::back::archive::{
|
|
ArArchiveBuilder, ArchiveBuilder, ArchiveBuilderBuilder, DEFAULT_OBJECT_READER,
|
|
};
|
|
use rustc_session::Session;
|
|
|
|
pub(crate) struct ArArchiveBuilderBuilder;
|
|
|
|
impl ArchiveBuilderBuilder for ArArchiveBuilderBuilder {
|
|
fn new_archive_builder<'a>(&self, sess: &'a Session) -> Box<dyn ArchiveBuilder + 'a> {
|
|
Box::new(ArArchiveBuilder::new(sess, &DEFAULT_OBJECT_READER))
|
|
}
|
|
|
|
fn create_dll_import_lib(
|
|
&self,
|
|
sess: &Session,
|
|
_lib_name: &str,
|
|
_dll_imports: &[rustc_session::cstore::DllImport],
|
|
_tmpdir: &Path,
|
|
_is_direct_dependency: bool,
|
|
) -> PathBuf {
|
|
sess.dcx().fatal("raw-dylib is not yet supported by rustc_codegen_cranelift");
|
|
}
|
|
}
|