2020-05-10 10:54:30 -04:00
|
|
|
use std::path::{Path, PathBuf};
|
|
|
|
|
2022-05-28 10:43:51 +00:00
|
|
|
use rustc_codegen_ssa::back::archive::{
|
|
|
|
get_native_object_symbols, ArArchiveBuilder, ArchiveBuilder, ArchiveBuilderBuilder,
|
|
|
|
};
|
2020-11-14 03:02:03 +01:00
|
|
|
use rustc_session::Session;
|
2021-09-18 00:19:25 +03:00
|
|
|
|
2020-11-14 03:02:03 +01:00
|
|
|
use rustc_session::cstore::DllImport;
|
2020-05-10 10:54:30 -04:00
|
|
|
|
2022-05-28 10:43:51 +00:00
|
|
|
pub(crate) struct ArArchiveBuilderBuilder;
|
2020-05-10 10:54:30 -04:00
|
|
|
|
2022-07-28 09:07:49 +00:00
|
|
|
impl ArchiveBuilderBuilder for ArArchiveBuilderBuilder {
|
|
|
|
fn new_archive_builder<'a>(&self, sess: &'a Session) -> Box<dyn ArchiveBuilder<'a> + 'a> {
|
2022-05-28 10:43:51 +00:00
|
|
|
Box::new(ArArchiveBuilder::new(sess, get_native_object_symbols))
|
2020-05-10 10:54:30 -04:00
|
|
|
}
|
|
|
|
|
2022-07-28 09:07:49 +00:00
|
|
|
fn create_dll_import_lib(
|
|
|
|
&self,
|
|
|
|
_sess: &Session,
|
|
|
|
_lib_name: &str,
|
|
|
|
_dll_imports: &[DllImport],
|
|
|
|
_tmpdir: &Path,
|
2022-10-12 14:44:01 -07:00
|
|
|
_is_direct_dependency: bool,
|
2022-07-28 09:07:49 +00:00
|
|
|
) -> PathBuf {
|
2022-05-28 10:43:51 +00:00
|
|
|
unimplemented!("creating dll imports is not yet supported");
|
2020-05-10 10:54:30 -04:00
|
|
|
}
|
|
|
|
}
|