about summary refs log tree commit diff
path: root/library/unwind
AgeCommit message (Collapse)AuthorLines
2023-11-16unwind: add support for using `unwinding` crateSean Cross-6/+120
The `unwinding` crate supports processing unwinding data, and is written entirely in Rust. This allows it to be ported to new platforms more easily than using the llvm-based `libunwind`. While `libunwind` is very well supported on major targets, it is difficult to use on other targets. SGX is an example of this where Rust carries custom patches in order to enable backtrace support. This adds an alternative for supported architectures. Rather than providing a custom target, `unwinding` allows for a solution that is completely written in Rust. This adds `xous` as the first consumer, and forthcoming patches will modify libstd to take advantage of this. Signed-off-by: Sean Cross <sean@xobs.io>
2023-11-02Remove obsolete support for linking unwinder on AndroidPeter Collingbourne-33/+1
Linking libgcc is no longer supported (see #103673), so remove the related link attributes and the check in unwind's build.rs. The check was the last remaining significant piece of logic in build.rs, so remove build.rs as well.
2023-10-10Use pointers instead of `usize` addresses for landing padsniluxv-7/+8
This bring unwind and personality code more in line with strict-provenance
2023-10-09Support AIX in Rust standard libraryQiu Chaofan-0/+4
2023-09-21added support for GNU/HurdSamuel Thibault-0/+4
2023-08-23Bump cfg(bootstrap)Mark Rousskov-1/+1
2023-08-14add a csky-unknown-linux-gnuabiv2 targetDirreke-0/+3
2023-08-03Add `internal_features` lintNilstrieb-0/+1
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
2023-07-18support for mips32r6 as a target_arch valuechenx97-1/+1
2023-07-18support for mips64r6 as a target_arch valuechenx97-1/+1
2023-06-21wip: Support Apple tvOS in libstdThom Chiovoloni-1/+1
2023-04-11Rollup merge of #96971 - zhaixiaojuan:master, r=wesleywiserMichael Goulet-0/+3
Initial support for loongarch64-unknown-linux-gnu Hi, We hope to add a new port in rust for LoongArch. LoongArch intro LoongArch is a RISC style ISA which is independently designed by Loongson Technology in China. It is divided into two versions, the 32-bit version (LA32) and the 64-bit version (LA64). LA64 applications have application-level backward binary compatibility with LA32 applications. LoongArch is composed of a basic part (Loongson Base) and an expanded part. The expansion part includes Loongson Binary Translation (LBT), Loongson VirtualiZation (LVZ), Loongson SIMD EXtension (LSX) and Loongson Advanced SIMD EXtension(LASX). Currently the LA464 processor core supports LoongArch ISA and the Loongson 3A5000 processor integrates 4 64-bit LA464 cores. LA464 is a four-issue 64-bit high-performance processor core. It can be used as a single core for high-end embedded and desktop applications, or as a basic processor core to form an on-chip multi-core system for server and high-performance machine applications. Documentations: ISA: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html ABI: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html More docs can be found at: https://loongson.github.io/LoongArch-Documentation/README-EN.html Since last year, we have locally adapted two versions of rust, rust1.41 and rust1.57, and completed the test locally. I'm not sure if I'm submitting all the patches at once, so I split up the patches and here's one of the commits
2023-04-04library/unwind: Add definitions for loongarch64zhaixiaojuan-0/+3
2023-03-28Add OpenHarmony targetsAmanieu d'Antras-0/+16
- `aarch64-unknown-linux-ohos` - `armv7-unknown-linux-ohos`
2023-03-03Match unmatched backticks in library/est31-1/+1
2023-02-28Add QNX Neutrino support to libstdFlorian Bartels-0/+4
Co-authored-by: gh-tr <troach@qnx.com>
2022-12-30Replace libstd, libcore, liballoc in line comments.jonathanCogan-1/+1
2022-11-22Rollup merge of #104464 - mati865:reduce-eh-overallocation-amd64, r=thomccDylan DPC-1/+4
Reduce exceptions overallocation on non Windows x86_64 Addressing https://github.com/rust-lang/rust/pull/103894#discussion_r1020950196
2022-11-15Reduce exceptions overallocation on non Windows x86_64Mateusz Mikuła-1/+4
Addressing https://github.com/rust-lang/rust/pull/103894#discussion_r1020950196
2022-11-15Fix building of `aarch64-pc-windows-gnullvm`Mateusz Mikuła-1/+1
That change had been lost during rebase
2022-11-14Move most of unwind's build script to lib.rsbjorn3-24/+24
Only the android libunwind detection remains in the build script * Reduces dependence on build scripts for building the standard library * Reduces dependence on exact target names in favor of using semantic cfg(target_*) usage. * Keeps almost all code related to linking of the unwinder in one file
2022-11-13Rollup merge of #103744 - palfrey:unwind-upgrade-cc, r=Mark-SimulacrumManish Goregaokar-1/+1
Upgrade cc for working is_flag_supported on cross-compiles https://github.com/rust-lang/rust/pull/85806 fixed unwind v.s gcc support on later Android ndks using `is_flag_supported`. However, due to https://github.com/rust-lang/cc-rs/issues/675, this didn't work properly on cross-compiles. https://github.com/rust-lang/cc-rs/commit/3eeb50b391a7543a6fed96276ee9388b5430a50d fixes this, and was released in cc 1.0.74, hence the upgrade
2022-11-13Auto merge of #103894 - mati865:gnullvm-libunwind-changes, r=thomccbors-6/+8
Change the way libunwind is linked for *-windows-gnullvm targets I have no idea why previous way works for `x86_64-fortanix-unknown-sgx` (assuming it actually works...) but not for `gnullvm`. It fails when linking libtest during Rust build (unless somebody adds `RUSTFLAGS='-Clinkarg=-lunwind'`). Also fixes exception handling on AArch64.
2022-11-12Bump unwinder private data size for AArch64 WindowsMateusz Mikuła-1/+4
This fixes unwinding on `aarch64-*-windows-gnu*`.
2022-11-09Upgrade cc to 1.0.76Tom Parker-Shemilt-1/+1
2022-11-05Remove linuxkernel targetsAlex Gaynor-1/+0
These are not used by the actual Rust-for-Linux project, so they're mostly just confusing.
2022-11-02Remove std's transitive dependency on cfg-if 0.1Collin Baker-1/+1
After rust-lang/rust#101946 this completes the move to cfg-if 1.0 by: * Updating getrandom 0.1.14->0.1.16 * Updating panic_abort, panic_unwind, and unwind to cfg-if 1.0
2022-11-01Change the way libunwind is linked for `*-windows-gnullvm` targetsMateusz Mikuła-5/+4
2022-10-29Upgrade cc for working is_flag_supported on cross-compilesTom Parker-Shemilt-1/+1
2022-08-15unwind: don't build dependency when building for MiriRalf Jung-1/+7
2022-08-10add crt-static for androidBryanskiy-6/+21
2022-07-20Rollup merge of #98101 - vladimir-ea:stdlib_watch_os, r=thomccDylan DPC-3/+3
stdlib support for Apple WatchOS This is a follow-up to https://github.com/rust-lang/rust/pull/95243 (Add Apple WatchOS compiler targets) that adds stdlib support for Apple WatchOS. `@deg4uss3r` `@nagisa`
2022-07-20Library changes for Apple WatchOSVladimir Michael Eatwell-3/+3
2022-07-01update cfg(bootstrap)sPietro Albini-1/+0
2022-06-09Stabilize the `bundle` native library modifierVadim Petrochenkov-1/+1
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-19Auto merge of #97033 - nbdd0121:unwind3, r=Amanieubors-4/+1
Remove libstd's calls to `C-unwind` foreign functions Remove all libstd and its dependencies' usage of `extern "C-unwind"`. This is a prerequiste of a WIP PR which will forbid libraries calling `extern "C-unwind"` functions to be compiled in `-Cpanic=unwind` and linked against `panic_abort` (this restriction is necessary to address soundness bug #96926). Cargo will ensure all crates are compiled with the same `-Cpanic` but the std is only compiled `-Cpanic=unwind` but needs the ability to be linked into `-Cpanic=abort`. Currently there are two places where `C-unwind` is used in libstd: * `__rust_start_panic` is used for interfacing to the panic runtime. This could be `extern "Rust"` * `_{rdl,rg}_oom`: a shim `__rust_alloc_error_handler` will be generated by codegen to call into one of these; they can also be `extern "Rust"` (in fact, the generated shim is used as `extern "Rust"`, so I am not even sure why these are not, probably because they used to `extern "C"` and was changed to `extern "C-unwind"` when we allow alloc error hooks to unwind, but they really should just be using Rust ABI). For dependencies, there is only one `extern "C-unwind"` function call, in `unwind` crate. This can be expressed as a re-export. More dicussions can be seen in the Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/soundness.20in.20mixed.20panic.20mode `@rustbot` label: T-libs F-c_unwind
2022-05-14Use re-export instead of inline wrapper in libunwindGary Guo-4/+1
This ensures that there are no calls to `C-unwind` function in libunwind.
2022-05-13Add LLVM based mingw-w64 targetsMateusz Mikuła-1/+6
2022-04-07Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrumbors-1/+0
Bump bootstrap compiler to 1.61.0 beta This PR bumps the bootstrap compiler to the 1.61.0 beta. The first commit changes the stage0 compiler, the second commit applies the "mechanical" changes and the third and fourth commits apply changes explained in the relevant comments. r? `@Mark-Simulacrum`
2022-04-05trivial cfg(bootstrap) changesPietro Albini-1/+0
2022-04-04Rely on #[link] attribute for unwind on Fuchsia.Adam Perry-2/+0
Closes #95575.
2022-03-30Stabilize native library modifier syntax and the `whole-archive` modifier ↵Vadim Petrochenkov-1/+1
specifically
2022-03-07Rollup merge of #93350 - gburgessiv:master, r=Mark-SimulacrumMatthias Krüger-0/+4
libunwind: readd link attrs to _Unwind_Backtrace It seems the removal of these in 1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them fixes the build. fixes rust-lang/rust#93349 r? `@alexcrichton`
2022-02-12library/unwind: Define unwinder_private_data_size for m68kJohn Paul Adrian Glaubitz-0/+3
2022-01-26libunwind: readd link attrs to _Unwind_BacktraceGeorge Burgess IV-0/+4
It seems the removal of these in 1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them fixes the build. fixes rust-lang/rust#93349
2021-12-23Switch all libraries to the 2021 editionDeadbeef-1/+1
2021-11-30Android: -ldl must appear after -lgcc when linkingAmanieu d'Antras-0/+3
2021-10-23Repace use of `static_nobundle` with `native_link_modifiers`Mateusz Mikuła-1/+0
This fixes warning when building Rust and running tests: ``` warning: library kind `static-nobundle` has been superseded by specifying `-bundle` on library kind `static`. Try `static:-bundle` warning: `rustc_llvm` (lib) generated 2 warnings (1 duplicate) ```
2021-10-06Add new target armv7-unknown-linux-uclibceabihfYannick Koehler-2/+2
Co-authored-by: Jonah Petri <jonah@petri.us>