mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Add cfg(ktest)
as a well-known configuration
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ab1d931cb7
commit
8633893bb9
@ -209,6 +209,9 @@ fn build_kernel_elf(
|
||||
// We do not really allow unwinding except for kernel testing. However, we need to specify
|
||||
// this to show backtraces when panicking.
|
||||
"-C panic=unwind",
|
||||
// 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)",
|
||||
]);
|
||||
|
||||
if matches!(arch, Arch::X86_64) {
|
||||
|
Reference in New Issue
Block a user