about summary refs log tree commit diff
path: root/src/librustc_session
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-30 07:04:43 +0000
committerbors <bors@rust-lang.org>2020-04-30 07:04:43 +0000
commitbf459752d41a93eb6df0e9513de4ef807883a80c (patch)
tree6a6e05a05077a1f72fcf055196b69be3eb341b6a /src/librustc_session
parent7c8dbd969dd0ef2af6d8bab9e03ba7ce6cac41a2 (diff)
parentc6817ffb2cadae7f80414e13d99e89ec83db9a77 (diff)
Auto merge of #70175 - Amanieu:remove_nlp, r=pnkfelix
Remove -Z no-landing-pads flag

Since #67502, `-Z no-landing-pads` will cause all attempted unwinds to abort since we don't generate a `try` / `catch`. This previously worked because `__rust_try` was located in libpanic_unwind which is always compiled with `-C panic=unwind`, but `__rust_try` is now directly inline into the crate that uses `catch_unwind`.

As such, `-Z no-landing-pads` is now mostly useless and people should use `-C panic=abort` instead.
Diffstat (limited to 'src/librustc_session')
-rw-r--r--src/librustc_session/options.rs2
-rw-r--r--src/librustc_session/session.rs3
2 files changed, 0 insertions, 5 deletions
diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs
index 5b983d1105d..be78d46b981 100644
--- a/src/librustc_session/options.rs
+++ b/src/librustc_session/options.rs
@@ -878,8 +878,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "omit DWARF address ranges that give faster lookups"),
     no_interleave_lints: bool = (false, parse_no_flag, [UNTRACKED],
         "execute lints separately; allows benchmarking individual lints"),
-    no_landing_pads: bool = (false, parse_no_flag, [TRACKED],
-        "omit landing pads for unwinding"),
     no_leak_check: bool = (false, parse_no_flag, [UNTRACKED],
         "disable the 'leak check' for subtyping; unsound, but useful for tests"),
     no_link: bool = (false, parse_no_flag, [TRACKED],
diff --git a/src/librustc_session/session.rs b/src/librustc_session/session.rs
index 42f9a8d6b05..3b7c2f268ce 100644
--- a/src/librustc_session/session.rs
+++ b/src/librustc_session/session.rs
@@ -540,9 +540,6 @@ impl Session {
         self.opts.debugging_opts.fewer_names || !more_names
     }
 
-    pub fn no_landing_pads(&self) -> bool {
-        self.opts.debugging_opts.no_landing_pads || self.panic_strategy() == PanicStrategy::Abort
-    }
     pub fn unstable_options(&self) -> bool {
         self.opts.debugging_opts.unstable_options
     }