diff options
| author | Daniel Paoliello <danpao@microsoft.com> | 2024-09-19 15:00:30 -0700 |
|---|---|---|
| committer | Daniel Paoliello <danpao@microsoft.com> | 2024-09-24 10:10:31 -0700 |
| commit | b2fd8a0192f6a69a4fb969ab3d005b577a524371 (patch) | |
| tree | 13ea8e2625cdcadd74674e28ea0435118a4d7cf0 /compiler/rustc_codegen_ssa/src/common.rs | |
| parent | 13a50977964460d8fb5bdf10740de3ac93e6021b (diff) | |
| download | rust-b2fd8a0192f6a69a4fb969ab3d005b577a524371.tar.gz rust-b2fd8a0192f6a69a4fb969ab3d005b577a524371.zip | |
Test fixing raw-dylib
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/common.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/common.rs b/compiler/rustc_codegen_ssa/src/common.rs index 582a2a87e48..965bd34ac14 100644 --- a/compiler/rustc_codegen_ssa/src/common.rs +++ b/compiler/rustc_codegen_ssa/src/common.rs @@ -187,12 +187,15 @@ pub fn i686_decorated_name( dll_import: &DllImport, mingw: bool, disable_name_mangling: bool, + force_fully_decorated: bool, ) -> String { let name = dll_import.name.as_str(); - let (add_prefix, add_suffix) = match dll_import.import_name_type { - Some(PeImportNameType::NoPrefix) => (false, true), - Some(PeImportNameType::Undecorated) => (false, false), + let (add_prefix, add_suffix) = match (force_fully_decorated, dll_import.import_name_type) { + // No prefix is a bit weird, in that LLVM/ar_archive_writer won't emit it, so we will + // ignore `force_fully_decorated` and always partially decorate it. + (_, Some(PeImportNameType::NoPrefix)) => (false, true), + (false, Some(PeImportNameType::Undecorated)) => (false, false), _ => (true, true), }; |
