about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-06 02:23:01 +0000
committerbors <bors@rust-lang.org>2023-12-06 02:23:01 +0000
commit84a554cda91d63c3b1241153f23eaa10ddd0292d (patch)
tree1af6add4a78c5553e27b7f7ff2de6e0df15c8612 /compiler/rustc_hir_analysis/src
parent28968414c57f12b827f01a5e6b99017b7ffa7370 (diff)
parent0773afc968d35bd6661bdbbe4c73fbb304c402ac (diff)
downloadrust-84a554cda91d63c3b1241153f23eaa10ddd0292d.tar.gz
rust-84a554cda91d63c3b1241153f23eaa10ddd0292d.zip
Auto merge of #117072 - betrusted-io:unwinding-crate-support, r=cuviper
Use `unwinding` crate for unwinding on Xous platform

This patch adds support for using [unwinding](https://github.com/nbdd0121/unwinding) on platforms where libunwinding isn't viable. An example of such a platform is `riscv32imac-unknown-xous-elf`.

### Background

The Rust project maintains a fork of llvm at [llvm-project](https://github.com/rust-lang/llvm-project/) where it applies patches on top of the llvm project. This mostly seems to be to get unwinding support for the SGX project, and there may be other patches that I'm unaware of.

There is a lot of machinery in the build system to support compiling `libunwind` on other platforms, and I needed to add additional patches to llvm in order to add support for Xous.

Rather than continuing down this path, it seemed much easier to use a Rust-based library. The `unwinding` crate by `@nbdd0121` fits this description perfectly.

### Future work

This could potentially replace the custom patches for `libunwind` on other platforms such as SGX, and could enable unwinding support on many more exotic platforms.

### Anti-goals

This is not designed to replace `libunwind` on tier-one platforms or those where unwinding support already exists. There is already a well-established approach for unwinding there. Instead, this aims to enable unwinding on new platforms where C++ code may be difficult to compile.
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
0 files changed, 0 insertions, 0 deletions