diff --git a/Cargo.toml b/Cargo.toml index 9d5c27b96df5d..2f5a708e8dc6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,13 +31,6 @@ exclude = [ "obj", ] -# Curiously, LLVM 7.0 will segfault if compiled with opt-level=3 -# See issue https://github.com/rust-lang/rust/issues/52378 -[profile.release] -opt-level = 2 -[profile.bench] -opt-level = 2 - # These options are controlled from our rustc wrapper script, so turn them off # here and have them controlled elsewhere. [profile.dev] diff --git a/src/librustc_mir/interpret/step.rs b/src/librustc_mir/interpret/step.rs index a99abc4cbf428..7d59c0181a8f3 100644 --- a/src/librustc_mir/interpret/step.rs +++ b/src/librustc_mir/interpret/step.rs @@ -38,6 +38,9 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { /// Returns `true` as long as there are more things to do. /// /// This is used by [priroda](https://github.com/oli-obk/priroda) + /// + /// This is marked `#inline(always)` to work around adverserial codegen when `opt-level = 3` + #[inline(always)] pub fn step(&mut self) -> InterpResult<'tcx, bool> { if self.stack.is_empty() { return Ok(false); diff --git a/src/test/run-make/wasm-stringify-ints-small/Makefile b/src/test/run-make/wasm-stringify-ints-small/Makefile index 26de6a0c68990..01e1c6b0ce8d8 100644 --- a/src/test/run-make/wasm-stringify-ints-small/Makefile +++ b/src/test/run-make/wasm-stringify-ints-small/Makefile @@ -4,7 +4,7 @@ ifeq ($(TARGET),wasm32-unknown-unknown) all: $(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown wc -c < $(TMPDIR)/foo.wasm - [ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "20500" ] + [ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "25000" ] else all: endif