diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 828e82d38321d..b751031e88b53 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -507,7 +507,7 @@ impl Build { /// Get the space-separated set of activated features for the standard /// library. fn std_features(&self) -> String { - let mut features = String::new(); + let mut features = "panic-unwind".to_string(); if self.config.debug_jemalloc { features.push_str(" debug-jemalloc"); } diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index 21e6acc37f3d5..b9f52e20fdd8c 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -13,7 +13,7 @@ crate-type = ["dylib", "rlib"] alloc = { path = "../liballoc" } alloc_jemalloc = { path = "../liballoc_jemalloc", optional = true } alloc_system = { path = "../liballoc_system" } -panic_unwind = { path = "../libpanic_unwind" } +panic_unwind = { path = "../libpanic_unwind", optional = true } panic_abort = { path = "../libpanic_abort" } collections = { path = "../libcollections" } core = { path = "../libcore" } @@ -29,5 +29,6 @@ gcc = "0.3.27" [features] backtrace = [] -jemalloc = ["alloc_jemalloc"] debug-jemalloc = ["alloc_jemalloc/debug"] +jemalloc = ["alloc_jemalloc"] +panic-unwind = ["panic_unwind"] diff --git a/src/rustc/std_shim/Cargo.toml b/src/rustc/std_shim/Cargo.toml index 58a7bd8a1cb75..b4b7acc4e66b8 100644 --- a/src/rustc/std_shim/Cargo.toml +++ b/src/rustc/std_shim/Cargo.toml @@ -45,6 +45,7 @@ core = { path = "../../libcore" } # Reexport features from std [features] -jemalloc = ["std/jemalloc"] -debug-jemalloc = ["std/debug-jemalloc"] backtrace = ["std/backtrace"] +debug-jemalloc = ["std/debug-jemalloc"] +jemalloc = ["std/jemalloc"] +panic-unwind = ["std/panic-unwind"]