From 01e8616be924d380659281c59c4b499917323c23 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 29 May 2018 14:44:42 +0200 Subject: [PATCH 1/2] Revert "Set opt-level to 3" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit aad9840ad49c56830384e87bc8bd87fd0199dc44. Level 3 (possibly indirectly, the underlying bug might be in XCode’s linker) causes unit tests to sefault when compiled with some versions of XCode: https://github.com/rust-lang/rust/issues/50867 It also appears to cause some segfaults on Windows: https://github.com/rust-lang/rust/pull/50329#issuecomment-386853473 … and regressions in some rustc performance benchmarks: https://github.com/rust-lang/rust/pull/50329#issuecomment-388084894 --- src/Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Cargo.toml b/src/Cargo.toml index 7504b43e20cb3..15d2cbf80bad4 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -40,6 +40,14 @@ members = [ "tools/rls/test_data/workspace_symbol", ] +# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit +# MSVC when running the compile-fail test suite when a should-fail test panics. +# But hey if this is removed and it gets past the bots, sounds good to me. +[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] From 5067d2f133a2a5be4b39cea37d110bfa10c0ea6c Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 29 May 2018 17:38:23 +0200 Subject: [PATCH 2/2] Change the comment on `opt-level = 2` to point to https://github.com/rust-lang/rust/issues/50867 --- src/Cargo.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Cargo.toml b/src/Cargo.toml index 15d2cbf80bad4..8ce4c97601bab 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -40,9 +40,8 @@ members = [ "tools/rls/test_data/workspace_symbol", ] -# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit -# MSVC when running the compile-fail test suite when a should-fail test panics. -# But hey if this is removed and it gets past the bots, sounds good to me. +# Curiously, libtest will segfault if compiled with opt-level=3 +# with some versions of XCode: https://github.com/rust-lang/rust/issues/50867 [profile.release] opt-level = 2 [profile.bench]