From 9357504a288c8081d5ed4184344620fb6245021c Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 18 Sep 2023 11:15:19 -0700 Subject: [PATCH] fix: copy PDBs for EFI targets EFI also uses the PE format with .pdb files, and rustc generates them, but Cargo does not copy them out of target/*/deps. This is an oversight, so this PR fixes it. Related: https://github.com/rust-osdev/uefi-rs/issues/289 Related: https://github.com/rust-lang/cargo/pull/5179 --- src/cargo/core/compiler/build_context/target_info.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 555a41b7544..c3b3dd48a11 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -465,7 +465,7 @@ impl TargetInfo { // the names to match. should_replace_hyphens: false, }) - } else if target_triple.ends_with("-msvc") { + } else if target_triple.ends_with("-msvc") || target_triple.ends_with("-uefi") { ret.push(FileType { suffix: ".pdb".to_string(), prefix: prefix.clone(),