diff options
| author | bors <bors@rust-lang.org> | 2022-10-29 20:44:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-29 20:44:01 +0000 |
| commit | 90b3882115c9c499b67824b89b641b51f5c0c40d (patch) | |
| tree | 53c1d1843223a4e9a4f95901b7e06ac9bd9430fc /compiler/rustc_codegen_llvm/src/back/archive.rs | |
| parent | 636a78aca875fcba6468eabe750a79f08ee9a635 (diff) | |
| parent | 108b32ea5909e793d053a2590eb5916eac05352d (diff) | |
| download | rust-90b3882115c9c499b67824b89b641b51f5c0c40d.tar.gz rust-90b3882115c9c499b67824b89b641b51f5c0c40d.zip | |
Auto merge of #103739 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backport rollup * poll_fn and Unpin: fix pinning #102737 * Support raw-dylib functions being used inside inlined functions #102988 * Fix line numbers for MIR inlined code #103071 * Add architectures to fn create_object_file #103240 * Add eval hack in super_relate_consts back #103279 * Mark std::os::wasi::io::AsFd etc. as stable. #103308 * Truncate thread names on Linux and Apple targets #103379 * Do not consider repeated lifetime params for elision. #103450 * rustdoc: add missing URL redirect #103588 * Remove commit_if_ok probe from NLL type relation #103601 Also includes a copy of the release notes. r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/archive.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/archive.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/archive.rs b/compiler/rustc_codegen_llvm/src/back/archive.rs index 38a366095b4..ed96355a052 100644 --- a/compiler/rustc_codegen_llvm/src/back/archive.rs +++ b/compiler/rustc_codegen_llvm/src/back/archive.rs @@ -104,10 +104,12 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder { lib_name: &str, dll_imports: &[DllImport], tmpdir: &Path, + is_direct_dependency: bool, ) -> PathBuf { + let name_suffix = if is_direct_dependency { "_imports" } else { "_imports_indirect" }; let output_path = { let mut output_path: PathBuf = tmpdir.to_path_buf(); - output_path.push(format!("{}_imports", lib_name)); + output_path.push(format!("{}{}", lib_name, name_suffix)); output_path.with_extension("lib") }; @@ -134,7 +136,8 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder { // that loaded but crashed with an AV upon calling one of the imported // functions. Therefore, use binutils to create the import library instead, // by writing a .DEF file to the temp dir and calling binutils's dlltool. - let def_file_path = tmpdir.join(format!("{}_imports", lib_name)).with_extension("def"); + let def_file_path = + tmpdir.join(format!("{}{}", lib_name, name_suffix)).with_extension("def"); let def_file_content = format!( "EXPORTS\n{}", |
