Skip to content

Commit abc8372

Browse files
committed
Disable ARM ehabi when building without landing pads
1 parent dce61c9 commit abc8372

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/librustc/back/link.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,13 @@ pub mod write {
337337
llvm_c_strs.push(s);
338338
};
339339
add("rustc"); // fake program name
340-
add("-arm-enable-ehabi");
341-
add("-arm-enable-ehabi-descriptors");
340+
341+
// Only enable ARM EHABI if we are unwinding
342+
if !sess.no_landing_pads() {
343+
add("-arm-enable-ehabi");
344+
add("-arm-enable-ehabi-descriptors");
345+
}
346+
342347
if vectorize_loop { add("-vectorize-loops"); }
343348
if vectorize_slp { add("-vectorize-slp"); }
344349
if sess.time_llvm_passes() { add("-time-passes"); }

0 commit comments

Comments
 (0)