diff options
| author | bors <bors@rust-lang.org> | 2022-07-26 01:47:34 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-26 01:47:34 +0000 | 
| commit | daaae25022cedcd7ded230170cdf48cfb799f9a2 (patch) | |
| tree | 78d33cdcf2d2c8924feae2d7159acb74bd766d5a /compiler/rustc_codegen_gcc/src | |
| parent | a86705942c4cfaaee60f2e7308ca2bca703a710f (diff) | |
| parent | 1f33785ed4a4774c5d68c78a13a24f9faf0dac55 (diff) | |
| download | rust-daaae25022cedcd7ded230170cdf48cfb799f9a2.tar.gz rust-daaae25022cedcd7ded230170cdf48cfb799f9a2.zip | |
Auto merge of #98989 - dpaoliello:rawdylibbin, r=michaelwoerister
Enable raw-dylib for bin crates Fixes #93842 When `raw-dylib` is used in a `bin` crate, we need to collect all of the `raw-dylib` functions, generate the import library and add that to the linker command line. I also changed the tests so that 1) the C++ dlls are created after the Rust dlls, thus there is no chance of accidentally using them in the Rust linking process and 2) disabled generating import libraries when building with MSVC.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/archive.rs | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/compiler/rustc_codegen_gcc/src/archive.rs b/compiler/rustc_codegen_gcc/src/archive.rs index 411ec27139e..21f62a6b009 100644 --- a/compiler/rustc_codegen_gcc/src/archive.rs +++ b/compiler/rustc_codegen_gcc/src/archive.rs @@ -4,7 +4,6 @@ use std::path::{Path, PathBuf}; use rustc_codegen_ssa::back::archive::ArchiveBuilder; use rustc_session::Session; -use rustc_data_structures::temp_dir::MaybeTempDir; use rustc_session::cstore::DllImport; struct ArchiveConfig<'a> { @@ -177,7 +176,16 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> { any_members } - fn inject_dll_import_lib(&mut self, _lib_name: &str, _dll_imports: &[DllImport], _tmpdir: &MaybeTempDir) { + fn sess(&self) -> &Session { + self.config.sess + } + + fn create_dll_import_lib( + _sess: &Session, + _lib_name: &str, + _dll_imports: &[DllImport], + _tmpdir: &Path, + ) -> PathBuf { unimplemented!(); } } | 
