about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-11-24 13:17:49 +0100
committerGitHub <noreply@github.com>2020-11-24 13:17:49 +0100
commit95e7af353fbcb44a6bfff775a79843eabb109971 (patch)
tree32071bf7aad476b73f0a11e4db2161a821b5f393 /compiler/rustc_interface/src
parentce197961ac4b7ead828bd7ed556d250157a3d1fa (diff)
parent7b62e09b0333e268e5546d52f2072eb340cec7ea (diff)
downloadrust-95e7af353fbcb44a6bfff775a79843eabb109971.tar.gz
rust-95e7af353fbcb44a6bfff775a79843eabb109971.zip
Rollup merge of #79367 - Dirbaio:trap-unreachable, r=jonas-schievink
Allow disabling TrapUnreachable via -Ztrap-unreachable=no

Currently this is only possible by defining a custom target, which is quite unwieldy.

This is useful for embedded targets where small code size is desired. For example, on my project (thumbv7em-none-eabi) this yields a 0.6% code size reduction: 132892 bytes -> 132122 bytes (770 bytes down).
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/tests.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs
index 01d5ed2f34a..92262050b8c 100644
--- a/compiler/rustc_interface/src/tests.rs
+++ b/compiler/rustc_interface/src/tests.rs
@@ -592,6 +592,7 @@ fn test_debugging_options_tracking_hash() {
     tracked!(thinlto, Some(true));
     tracked!(tune_cpu, Some(String::from("abc")));
     tracked!(tls_model, Some(TlsModel::GeneralDynamic));
+    tracked!(trap_unreachable, Some(false));
     tracked!(treat_err_as_bug, Some(1));
     tracked!(unleash_the_miri_inside_of_you, true);
     tracked!(use_ctors_section, Some(true));