1
Fork 0

Preserve split DWARF files when building archives.

The optimization that removes artifacts when building libraries is correct
from the compiler's perspective but not from a debugger's perspective.
Unpacked split debuginfo is referred to by filename and debuggers need
the artifact that contains debuginfo to continue to exist at that path.

Ironically the test expects the correct behavior but it was not running.
This commit is contained in:
Kyle Huey 2023-01-15 09:40:46 -08:00
parent 754f6d4a8c
commit 2b99b9fd25
3 changed files with 2 additions and 20 deletions

View file

@ -846,18 +846,6 @@ pub enum CrateType {
ProcMacro,
}
impl CrateType {
/// When generated, is this crate type an archive?
pub fn is_archive(&self) -> bool {
match *self {
CrateType::Rlib | CrateType::Staticlib => true,
CrateType::Executable | CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro => {
false
}
}
}
}
#[derive(Clone, Hash, Debug, PartialEq, Eq)]
pub enum Passes {
Some(Vec<String>),