Autodetect endianness based on target triple

This commit is contained in:
Syrus
2020-06-11 00:31:04 -07:00
parent b463f738a2
commit ff8f3c8948
5 changed files with 27 additions and 17 deletions

View File

@ -200,7 +200,9 @@ impl Compiler for CraneliftCompiler {
let (custom_sections, dwarf) = {
let mut custom_sections = PrimaryMap::new();
let dwarf = if let Some((dwarf_frametable, _cie_id)) = dwarf_frametable {
let mut eh_frame = EhFrame(WriterRelocate::default());
let mut eh_frame = EhFrame(WriterRelocate::new(
self.target().triple().endianness().ok(),
));
dwarf_frametable
.lock()
.unwrap()