]> git.lizzy.rs Git - rust.git/commitdiff
Make panic-unwind a default feature for libstd
authorLuca Barbieri <luca@luca-barbieri.com>
Fri, 10 Apr 2020 20:42:20 +0000 (22:42 +0200)
committerMark Rousskov <mark.simulacrum@gmail.com>
Sat, 11 Apr 2020 21:49:16 +0000 (17:49 -0400)
x.py sets it unconditionally, so want it for plain "cargo build".

We need to load one of the panic runtimes that is in src (vs. pre-built in the
compiler's sysroot) to ensure that we don't load libpanic_unwind from the
sysroot. That would lead to a load of libcore, also from the sysroot, and create
lots of errors about duplicate lang items.

src/libstd/Cargo.toml

index 3a83f3f569a26c391a9e51f5a7c3bbb165350fdd..ceb39c01c6723442d8ff7ec15d8d20c5f9d79644 100644 (file)
@@ -47,7 +47,7 @@ hermit-abi = { version = "0.1.10", features = ['rustc-dep-of-std'] }
 wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false }
 
 [features]
-default = ["std_detect_file_io", "std_detect_dlsym_getauxval"]
+default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"]
 
 backtrace = [
   "backtrace_rs/dbghelp",          # backtrace/symbolize on MSVC