Skip to content

Commit d6a0c2a

Browse files
committed
[EXPERIMENTAL] What if we forced unwind tables?
1 parent e0f17c0 commit d6a0c2a

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

Diff for: src/bootstrap/src/core/build_steps/test.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -3185,25 +3185,15 @@ impl Step for TestHelpers {
31853185
}
31863186
cfg.compiler(builder.cc(target));
31873187
}
3188-
3189-
let build = cfg
3190-
.cargo_metadata(false)
3188+
cfg.cargo_metadata(false)
31913189
.out_dir(&dst)
31923190
.target(&target.triple)
31933191
.host(&builder.config.build.triple)
31943192
.opt_level(0)
31953193
.warnings(false)
31963194
.debug(false)
3197-
.file(builder.src.join("tests/auxiliary/rust_test_helpers.c"));
3198-
3199-
// Needed to have line number tables
3200-
if target.is_msvc() {
3201-
build.flag("/Zi");
3202-
} else {
3203-
build.flag("-g1");
3204-
}
3205-
3206-
build.compile("rust_test_helpers");
3195+
.file(builder.src.join("tests/auxiliary/rust_test_helpers.c"))
3196+
.compile("rust_test_helpers");
32073197
}
32083198
}
32093199

Diff for: tests/ui/debuginfo/auxiliary/dylib-dep-helper-aux.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ compile-flags: -g -Cstrip=none
1+
//@ compile-flags: -g -Cstrip=none -Cforce-unwind-tables=yes
22

33
#[inline(never)]
44
pub fn callback<F>(f: F)

Diff for: tests/ui/debuginfo/auxiliary/dylib-dep-helper.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ compile-flags: -g -Cstrip=none
1+
//@ compile-flags: -g -Cstrip=none -Cforce-unwind-tables=yes
22

33
#![crate_type = "cdylib"]
44
#![crate_type = "rlib"]

Diff for: tests/ui/debuginfo/backtrace-dylib-dep.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//@ ignore-fuchsia Backtraces not symbolized
99
//@ ignore-musl musl doesn't support dynamic libraries (at least when the original test was written).
1010
//@ needs-unwind
11-
//@ compile-flags: -g -Copt-level=0 -Cstrip=none
11+
//@ compile-flags: -g -Copt-level=0 -Cstrip=none -Cforce-unwind-tables=yes
1212
//@ aux-crate: dylib_dep_helper=dylib-dep-helper.rs
1313
//@ aux-crate: auxiliary=dylib-dep-helper-aux.rs
1414
//@ run-pass

0 commit comments

Comments
 (0)