mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
Rollup merge of #47890 - pftbest:no_trap, r=alexcrichton
[MSP430] Don't enable trap_unreachable option by default on msp. Since MSP430 doesn't meaningfully support faulting on illegal instructions, LLVM generates a call to abort() function instead of a trap instruction. Such calls are 4 bytes long, and that is too much overhead for such small target. r? @alexcrichton
This commit is contained in:
commit
3d8279dec7
@ -53,6 +53,12 @@ pub fn target() -> TargetResult {
|
|||||||
// don't want to invoke that many gcc instances.
|
// don't want to invoke that many gcc instances.
|
||||||
default_codegen_units: Some(1),
|
default_codegen_units: Some(1),
|
||||||
|
|
||||||
|
// Since MSP430 doesn't meaningfully support faulting on illegal
|
||||||
|
// instructions, LLVM generates a call to abort() function instead
|
||||||
|
// of a trap instruction. Such calls are 4 bytes long, and that is
|
||||||
|
// too much overhead for such small target.
|
||||||
|
trap_unreachable: false,
|
||||||
|
|
||||||
.. Default::default( )
|
.. Default::default( )
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user