mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-16 17:46:48 +00:00
force-unwind-tables=yes
instead of panic=unwind
This commit is contained in:
parent
9c10568a73
commit
2bcc13a9e2
@ -50,8 +50,12 @@ allow_attributes = "warn"
|
||||
# Cargo only looks at the profile settings
|
||||
# in the Cargo.toml manifest at the root of the workspace
|
||||
|
||||
[profile.dev]
|
||||
panic = "unwind"
|
||||
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
panic = "unwind"
|
||||
|
||||
# Release profile configuration with Link Time Optimization (LTO) enabled.
|
||||
#
|
||||
|
@ -207,9 +207,8 @@ fn build_kernel_elf(
|
||||
&rustc_linker_script_arg,
|
||||
"-C relocation-model=static",
|
||||
"-C relro-level=off",
|
||||
// We do not really allow unwinding except for kernel testing. However, we need to specify
|
||||
// this to show backtraces when panicking.
|
||||
"-C panic=unwind",
|
||||
// Even if we disabled unwinding on panic, we need to specify this to show backtraces.
|
||||
"-C force-unwind-tables=yes",
|
||||
// This is to let rustc know that "cfg(ktest)" is our well-known configuration.
|
||||
// See the [Rust Blog](https://blog.rust-lang.org/2024/05/06/check-cfg.html) for details.
|
||||
"--check-cfg cfg(ktest)",
|
||||
|
@ -98,7 +98,7 @@ pub static KTEST_CRATE_WHITELIST: Option<&[&str]> = Some(&{:#?});
|
||||
&cargo_target_directory,
|
||||
config,
|
||||
ActionChoice::Test,
|
||||
&["--cfg ktest"],
|
||||
&["--cfg ktest", "-C panic=unwind"],
|
||||
);
|
||||
std::env::remove_var("RUSTFLAGS");
|
||||
drop(dir_guard);
|
||||
|
Loading…
x
Reference in New Issue
Block a user