Fix build errors in x86 unwind info when building no_std. (#1214)

This commit fixes the build errors in the unwind info implementation for
the x86 ABI by changing `byteorder` to build `no_std`.

This copies two simple functions from the `WriteBytesExt` trait so that
we can easily write to a `Vec<u8>` with a particular endianness.

Fixes #1203.
This commit is contained in:
Peter Huene
2019-11-07 16:41:32 -08:00
committed by Dan Gohman
parent cf82863ea9
commit 4ccf0fdfa3
3 changed files with 40 additions and 40 deletions

View File

@@ -836,6 +836,6 @@ pub fn emit_unwind_info(func: &ir::Function, isa: &dyn TargetIsa, mem: &mut Vec<
// Assumption: RBP is being used as the frame pointer
// In the future, Windows fastcall codegen should usually omit the frame pointer
if let Some(info) = UnwindInfo::try_from_func(func, isa, Some(RU::rbp.into())) {
info.emit(mem).expect("failed to emit unwind information");
info.emit(mem);
}
}