diff options
| author | Vadzim Dambrouski <pftbest@gmail.com> | 2018-01-31 00:57:30 +0300 |
|---|---|---|
| committer | Vadzim Dambrouski <pftbest@gmail.com> | 2018-01-31 00:57:30 +0300 |
| commit | 1e380cbfdd96365ef0eb6dfec341e85b68fa64b5 (patch) | |
| tree | 6bb09e00226760f0edcc1f54b2a87a90db283dc5 | |
| parent | def3269a71be2e737cad27418a3dad9f5bd6cd32 (diff) | |
| download | rust-1e380cbfdd96365ef0eb6dfec341e85b68fa64b5.tar.gz rust-1e380cbfdd96365ef0eb6dfec341e85b68fa64b5.zip | |
[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.
| -rw-r--r-- | src/librustc_back/target/msp430_none_elf.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_back/target/msp430_none_elf.rs b/src/librustc_back/target/msp430_none_elf.rs index 509a7cf5e03..966df897f01 100644 --- a/src/librustc_back/target/msp430_none_elf.rs +++ b/src/librustc_back/target/msp430_none_elf.rs @@ -53,6 +53,12 @@ pub fn target() -> TargetResult { // don't want to invoke that many gcc instances. 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( ) } }) |
