Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiletest: strip debuginfo by default for mode=ui #98140

Merged
merged 1 commit into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/test/ui/backtrace-apple-no-dsymutil.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// run-pass

// compile-flags:-Cstrip=none
// compile-flags:-g -Csplit-debuginfo=unpacked
// only-macos

Expand Down
1 change: 1 addition & 0 deletions src/test/ui/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// ignore-sgx no processes
// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
// compile-flags:-g
// compile-flags:-Cstrip=none

use std::env;
use std::process::{Command, Stdio};
Expand Down
4 changes: 4 additions & 0 deletions src/test/ui/numbers-arithmetic/promoted_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// run-fail
// error-pattern: overflow
// compile-flags: -C overflow-checks=yes
// for some reason, fails to match error string on
// wasm32-unknown-unknown with stripped debuginfo and symbols,
// so don't strip it
// compile-flags:-Cstrip=none

fn main() {
let x: &'static u32 = &(0u32 - 1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:21:5
thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:22:5
stack backtrace:
0: std::panicking::begin_panic
1: issue_47429_short_backtraces::main
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/panics/issue-47429-short-backtraces.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Regression test for #47429: short backtraces were not terminating correctly

// compile-flags: -O
// compile-flags:-Cstrip=none
// run-fail
// check-run-results
// exec-env:RUST_BACKTRACE=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:21:5
thread 'main' panicked at 'explicit panic', $DIR/issue-47429-short-backtraces.rs:22:5
stack backtrace:
0: std::panicking::begin_panic::<&str>
1: issue_47429_short_backtraces::main
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/panics/runtime-switch.legacy.run.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:24:5
thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:25:5
stack backtrace:
0: std::panicking::begin_panic
1: runtime_switch::main
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/panics/runtime-switch.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Test for std::panic::set_backtrace_style.

// compile-flags: -O
// compile-flags:-Cstrip=none
// run-fail
// check-run-results
// exec-env:RUST_BACKTRACE=0
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/panics/runtime-switch.v0.run.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:24:5
thread 'main' panicked at 'explicit panic', $DIR/runtime-switch.rs:25:5
stack backtrace:
0: std::panicking::begin_panic::<&str>
1: runtime_switch::main
Expand Down
4 changes: 4 additions & 0 deletions src/test/ui/panics/unique-panic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// run-fail
// error-pattern: panic
// for some reason, fails to match error string on
// wasm32-unknown-unknown with stripped debuginfo and symbols,
// so don't strip it
// compile-flags:-Cstrip=none

fn main() {
Box::new(panic!());
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/runtime/backtrace-debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

// compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0
// compile-flags:-Cforce-frame-pointers=yes
// compile-flags:-Cstrip=none
// ignore-pretty issue #37195
// ignore-emscripten spawning processes is not supported
// ignore-sgx no processes
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/std-backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// ignore-sgx no processes
// ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
// compile-flags:-g
// compile-flags:-Cstrip=none

#![feature(backtrace)]

Expand Down
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1882,6 +1882,8 @@ impl<'test> TestCx<'test> {
rustc.arg("-Ccodegen-units=1");
rustc.arg("-Zui-testing");
rustc.arg("-Zdeduplicate-diagnostics=no");
// FIXME: use this for other modes too, for perf?
rustc.arg("-Cstrip=debuginfo");
}
MirOpt => {
rustc.args(&[
Expand Down