From fe400b07351869689aa523d58286d5fbd6e2a6bb Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sat, 5 Aug 2023 20:41:26 +0800 Subject: [PATCH] cargo: support building as part of libstd Support using `unwinding` as a backend for the libstd `unwind` crate. This will enable unwinding support for new targets while allowing us to continue to use `libunwind` from llvm for supported targets. Signed-off-by: Sean Cross --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d84a5bc..f0ec722 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,8 @@ members = ["cdylib", "example"] gimli = { version = "0.26.1", default-features = false, features = ["read-core"] } libc = { version = "0.2", optional = true } spin = { version = "0.9.8", optional = true, default-features = false, features = ["mutex", "spin_mutex"] } +core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' } +compiler_builtins = { version = "0.1.2", optional = true } [features] alloc = [] @@ -36,6 +38,7 @@ panic-handler = ["print", "panic"] panic-handler-dummy = [] system-alloc = [] default = ["unwinder", "dwarf-expr", "hide-trace", "fde-phdr-dl", "fde-registry"] +rustc-dep-of-std = ["core", "gimli/rustc-dep-of-std", "compiler_builtins"] [profile.release] debug = true