Closed parraman closed 4 years ago
I don't think that it's currently possible to build libcore with this feature. However, it should be fairly straightforward to add, in case you want to create a pull request:
First, add a new configuration option to cargo-xbuild
by extending config.rs
. Don't forget to update the Readme and the help.txt. Next, extend the core
dependency declaration of liballoc
, which is defined here:
You probably want to add something like:
if config.panic_immediate_abort {
stoml.push_str("features = ['panic_immediate_abort']\n");
}
This should be enough to support this.
Hi,
I'd like to know if it is possible to compile the core library with the feature
panic_immediate_abort
. If I am not mistaken, this feature is not activated by default when the library is compiled. What I need is for the code not to call the panic hook but directly generate an abort that lowers to an illegal instruction or trap.I tried to use the RUSTFLAGS tag:
export RUSTFLAGS=--cfg features="panic_immediate_abort"
but it has not worked, as it is apparently not used when compiling
sysroot
, but only when generating the final library.I don't know if I'm doing anything wrong. Thanks in advance!