cg_llvm: implement split dwarf support
This commit implements Split DWARF support, wiring up the flag (added in earlier commits) to the modified FFI wrapper (also from earlier commits). Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
@@ -64,13 +64,15 @@ impl<M> ModuleCodegen<M> {
|
||||
pub fn into_compiled_module(
|
||||
self,
|
||||
emit_obj: bool,
|
||||
emit_dwarf_obj: bool,
|
||||
emit_bc: bool,
|
||||
outputs: &OutputFilenames,
|
||||
) -> CompiledModule {
|
||||
let object = emit_obj.then(|| outputs.temp_path(OutputType::Object, Some(&self.name)));
|
||||
let dwarf_object = emit_dwarf_obj.then(|| outputs.temp_path_dwo(Some(&self.name)));
|
||||
let bytecode = emit_bc.then(|| outputs.temp_path(OutputType::Bitcode, Some(&self.name)));
|
||||
|
||||
CompiledModule { name: self.name.clone(), kind: self.kind, object, bytecode }
|
||||
CompiledModule { name: self.name.clone(), kind: self.kind, object, dwarf_object, bytecode }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +81,7 @@ pub struct CompiledModule {
|
||||
pub name: String,
|
||||
pub kind: ModuleKind,
|
||||
pub object: Option<PathBuf>,
|
||||
pub dwarf_object: Option<PathBuf>,
|
||||
pub bytecode: Option<PathBuf>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user