809 Commits

Author SHA1 Message Date
Michael Kruse
afb80bddf1
[Runtimes] Introduce variables containing resource dir paths (#177953)
Introduce common infrastructure for runtimes that determines compiler
resource path locations. These variables introduced are:

 * RUNTIMES_OUTPUT_RESOURCE_DIR
 * RUNTIMES_INSTALL_RESOURCE_PATH
 
That contain the location for the compiler resource path (typically
`lib/clang/<version>`) in the build tree and the install tree (the
latter relative to CMAKE_INSTALL_PREFIX).

Additionally, define

 * RUNTIMES_OUTPUT_RESOURCE_LIB_DIR
 * RUNTIMES_INSTALL_RESOURCE_LIB_PATH

as for the location of clang/flang version-locked libraries (typically
`lib${LLVM_LIBDIR_SUFFIX}/<targer-triple>`, but also depends on `APPLE`
and `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR`). This code is moved from
flang-rt and initially becomes its only user.

Refactored out of #171610 as requested
[here](https://github.com/llvm/llvm-project/pull/171610#discussion_r2687382481).

Extracted `get_runtimes_target_libdir_common` from compiler-rt as
requested
[here](https://github.com/llvm/llvm-project/pull/171610#discussion_r2689565634).
 
Added TODO comments to all runtimes as requested
[here](https://github.com/llvm/llvm-project/pull/171610#issuecomment-3789598635).
2026-04-02 10:32:14 +00:00
Oliver Hunt
1aba434dab
[libunwind][PAC] Defang ptrauth's PC in valid CFI range abort (#184041)
It turns out making the CFI check a release mode abort causes many, if
not the majority, of JITs to fail during unwinding as they do not set up
CFI sections for their generated code. As a result any JITs that do
nominally support unwinding (and catching) through their JIT or assembly
frames trip this abort.

rdar://170862047
2026-03-27 14:33:08 +00:00
Jon Roelofs
47e4282c19
[libunwind][Apple] Improve test coverage on Apple platforms (#186423)
Introduces a macro abstraction around capturing the bounds of a
function, which many platforms handle subtly differently (Mach-O, and
ELF, for example).

Also introduce an arm64[^-]* -> aarch64 available feature, to enable
more tests that would otherwise be excluded on Apple platforms, whose
target triples tend to take the form e.g. 'arm64-apple-macosx', rather
than 'aarch64-apple-macosx'.

Third, we implement the has-sme check using the appropriate sysctl, as
getauxval is not available on Darwin platforms.
2026-03-25 18:16:19 -07:00
Jon Roelofs
0129ecf022
[llvm][CompactUnwind] Compact Unwind does not support .cfi_signal_frame (#186458)
Fixes libunwind's signal_frame.pass.cpp test on Mach-O platforms.
2026-03-25 13:58:19 -07:00
Brad Smith
588451c160
[libunwind] Fix building on OpenBSD / FreeBSD aarch64 (#188397)
Just checking for the header presence of sys/auxv.h breaks the
build on OpenBSD / FreeBSD. Make use of elf_aux_info().
2026-03-25 15:39:08 -04:00
Alex Crichton
a3f28233fc
[WebAssembly] Move __cpp_exception to libunwind (#185770)
The `__cpp_exception` symbol is now defined in libunwind instead of
compiler-rt. This is moved for a few reasons, but the primary reason is
that compiler-rt is linked duplicate-ly into all shared objects meaning
that it's not suitable for define-once symbols such as
`__cpp_exception`. By moving the definition to the user of the symbol,
libunwind itself, that guarantees that the symbol should be defined
exactly once and only when appropriate. A secondary reason for this
movement is that it avoids the need to compile compiler-rt twice: once
with exception and once without, and instead the same build can be used
for both exceptions-and-not.
2026-03-11 00:43:11 +00:00
Sam Clegg
0baf5a0496
Revert "Silence -Wunused-parameter warnings in Unwind-wasm.c" (#175776)
Reverts llvm/llvm-project#125412

See the discussion in #125412 for why this is necessary. The summary is
that:

- Eliding arguments is the C23 extension, but libunwind builds its C
files with `-std=c99`, so this change broke the build.
- `-Wno-unused-parameter` is part of the build for libunwind, so the
codebase does allow them.
2026-03-04 09:59:28 -08:00
Martin Storsjö
0991d7b8fd
[libunwind] Fix building with EXCEPTION_DISPOSITION as enum (#180513)
On Windows, libunwind is normally only built in mingw mode; it's not
relevant for MSVC targets. (Attempting to build it is entirely blocked
in CMake, see [1]).

In mingw headers, the type EXCEPTION_DISPOSITION is defined as an int
while it is an enum in the MSVC vcruntime headers.

However, in addition to the canonical enum members, we also use a value
which has no assigned enum member. In older mingw-w64 headers, there was
a define for this value, 4, with the name ExceptionExecuteHandler, but
that was removed in [2]. The libunwind code reference this value just by
the literal value 4, with a comment referencing it as
ExceptionExecuteHandler.

This extra enum value isn't passed to the outside Microsoft runtime, but
is only used to pass values from one part of libunwind to another; this
handling is necessary for the forced_unwind{1-3}.pass.cpp tests to
succeed.

If the mingw-w64 headers would define EXCEPTION_DISPOSITION as an enum,
just like the MSVC vcruntime headers, then we'd run into build errors
and warnings like this:

    llvm-project/libunwind/src/Unwind-seh.cpp:166:14: error: cannot initialize return object of type 'EXCEPTION_DISPOSITION' (aka 'enum _EXCEPTION_DISPOSITION') with an rvalue of type 'int'
          166 |       return 4 /* ExceptionExecuteHandler in mingw */;
              |              ^
    llvm-project/libunwind/src/Unwind-seh.cpp:185:14: error: cannot initialize return object of type 'EXCEPTION_DISPOSITION' (aka 'enum _EXCEPTION_DISPOSITION') with an rvalue of type 'int'
          185 |       return 4 /* ExceptionExecuteHandler in mingw */;
              |              ^
    llvm-project/libunwind/src/Unwind-seh.cpp:272:8: warning: case value not in enumerated type 'EXCEPTION_DISPOSITION' (aka 'enum _EXCEPTION_DISPOSITION') [-Wswitch]
          272 |   case 4 /*ExceptionExecuteHandler*/:
              |        ^

Fix these cases by adding explicit casts between EXCEPTION_DISPOSITION
and int.

A (partial) similar change was proposed in [3], but the author never
followed up on the discussion, and the PR was later closed.

[1] b0b546d44777eb1fa25995384876bd14a006a929
[2] 2de6703961
[3] https://github.com/llvm/llvm-project/pull/159293
2026-02-12 00:31:09 +02:00
willmafh
0653e079c2
[libunwind][NFC] Typo fixes & comments corrections & code style changes. (#174565) 2026-01-24 13:45:50 +00:00
Louis Dionne
ec983ad611
[runtimes] Post-branch tasks for the LLVM 23 release (#176007)
This performs most of the post-branch tasks to start working on the LLVM
23 release. Things that are left to do:
- Update the unicode version
- Update CI versions and supported compiler versions
2026-01-14 18:39:02 +00:00
Heejin Ahn
44d4a64a8b
[libunwind][WebAssembly] Fix typos (NFC) (#173745) 2026-01-05 13:54:53 -08:00
Daniil Kovalev
2b25e92948
[PAC][libunwind] Pass ptrauth-qualified values as const references (#173765)
For Apple's arm64e or Linux's pauthtest, `Registers_arm64::link_reg_t`
type is `__ptrauth`-qualified. When passing a value of such a type to a
function accepting non-`__ptrauth`-qualified parameter with `pint_t`
type, an authentication is performed. So, the corresponding callee
argument does not contain an embedded signature, making it prone to
substitution if spilled to the stack.

This patch prevents early authentication of signed values of
`link_reg_t` type by passing them as const l-value references instead of
passing by value with type `pint_t`. This way, the callee would operate
with a `__ptrauth`-qualified value containing a signature, allowing to
detect a substitution if the value is spilled to the stack.

Note that this approach was introduced previously in #143230 for some
other functions. In this patch, we apply the approach to the functions
which were not considered previously.
2026-01-02 12:28:30 +00:00
Daniil Kovalev
367e3889fa
[PAC][libunwind] Enhance PAuth-related comments in __unw_set_reg (#173769)
The PAuth-related checks performed for arm64e are also performed for
other PAuth-enabled ABIs such as Linux's pauthtest. This patch
introduces use of 'PAuth-enabled ABI' phrase instead of 'arm64e' term
for non-arm64e specific things. Also, on non-arm64e we cannot assume
that we have FPAC, so an additional explanation regarding resign
function guarantees is provided.

Note that other comments mentioning arm64e while not being
arm64e-specific are fixed as part of #171717.

Fixes #160117
2025-12-29 06:56:52 +00:00
Nikolas Klauser
3c100d5d54
[libc++] Enable -Wmissing-prototypes (#116261) 2025-12-16 11:25:07 +01:00
Louis Dionne
4ffd373e38
[runtimes] Remove dependencies on cxx_experimental for test-suite installs (#171678)
This patch removes explicit dependencies on cxx_experimental for
installations that are local to the test suite. Such dependencies
are not required anymore from the test-suite installation targets
since the proper dependency is now encoded between cxx and
cxx_experimental.
2025-12-12 12:09:11 -05:00
Louis Dionne
a9fadb3ed4
[runtimes] Modernize installation targets (#171677)
This patch moves away from using cmake_install scripts to install the
various targets when building runtimes, since those have been deprecated
by CMake. Instead, we use `cmake --install` which is the prefered
method.

This patch also localizes how we set dependencies on the various
installation targets, allowing the removal of a few global variables
that were used as lists.

Finally, it makes the way we set up installation targets for libc++,
libc++abi and libunwind consistent again.
2025-12-11 09:09:37 -05:00
Brad Smith
3fdce799cc
[libunwind] fix building on Haiku i386 (#171586)
Co-authored-by: Jérôme Duval <jerome.duval@gmail.com>
2025-12-10 21:27:21 -05:00
Louis Dionne
fb8a7c774d
[libunwind] Make sure libunwind test dependencies are installed before running tests (#171474)
This patch adds an installation step where we install libc++ in a fake
installation tree before testing libunwind. This is necessary because
some configurations (in particular "generic-merged") require libc++ to
be installed, since the libunwind tests are actually linking libc++.so
in which libc++abi.a and libunwind.a have been merged.

Without this, we were actually failing to find `libc++.so` to link
against and then linking against whatever system library we'd find in
the provided search directories. While this happens to work in the
current CI configuration, this breaks down when updating to newer build
tools.
2025-12-10 07:59:17 -05:00
Nathan Corbyn
63ea3537d5
[libunwind](TestOnly) Mark failing tests as unsupported on Apple targets (#170488)
#167642 introduced a number of test failures on one of our stage 2
builds:
https://ci.swift.org/job/llvm.org/job/clang-stage2-Rthinlto/1403/. This
PR marks these tests as unsupported on `.*-apple.*` targets.
2025-12-03 18:17:54 +00:00
Gleb Popov
33bcde0678
libunwind: Remove OS requirements from tests to make them run on more OSes (#167642)
There might be a cleaner way to enable these tests running on FreeBSD,
I'm open to suggestions.

Co-authored-by: Alexander Richardson <mail@alexrichardson.me>
2025-12-01 12:05:37 -08:00
hstk30-hw
6214dccbc9
[Unwind][AArch64] Match sigreturn instructions in big endian (#167139)
Since insns are always stored LE, on a BE system the opcodes will be
loaded byte-reversed. Therefore, define two sets of opcodes, one for LE
and one for BE.
2025-11-15 09:37:15 +08:00
Benjamin Maxwell
d2a2b169f6
[libunwind] Ensure zaDisable() is called in jumpto/returnto (NFC) (#167674)
This is an NFC for now, as the SME checks for macOS platforms are not
implemented, so zaDisable() is a no-op, but both paths for resuming from
an exception should disable ZA.

This is a fixup for a recent change in #165066.
2025-11-13 08:57:19 +00:00
Med Ismail Bennani
e5e9c3b4f2
[libunwind] Fix build error because of wrong register size (#167743) 2025-11-12 12:21:32 -08:00
Gleb Popov
5465979332
libunwind: Implement the unw_strerror function for better nongnu libunwind compatibility (#160887)
As it was explained to me in
https://discourse.llvm.org/t/libunwinds-raison-detre/88283/2 the LLVM
version of libunwind is mostly compatible with nongnu one. This change
improves the compatibility a bit further.
2025-11-11 20:45:42 -08:00
Med Ismail Bennani
cf35502dd5
[libunwind] Fix execution flow imbalance when using C++ Exceptions (#165066) 2025-11-11 18:31:57 -08:00
Benjamin Maxwell
5cb2c6806e
[libunwind][AArch64] Disable ZA before resuming from unwinding (on Linux) (#165451)
This patch reimplements the SME ABI `__arm_za_disable` routine within
libunwind. This routine must be called before resuming from unwinding on
AArch64 platforms with SME support.

Before calling the routine, we need to check that SME is available. In
this patch, this is implemented for Linux-based platforms by checking
HWCAP2. It should be possible to implement this check for other
platforms as required.

This patch includes a test for this functionality. This test requires
SME, so on platforms without it, it will simply pass.
2025-11-11 09:46:13 +00:00
Raul Tambre
afc83688cf
[libc++abi][libunwind] Enable AT&T syntax explicitly (#166818)
Implementation files using the Intel syntax typically explicitly specify
it. Do the same for the few files where applicable for AT&T.

This enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's
Clang config files (i.e. a global preference for Intel syntax).
2025-11-08 10:20:13 -10:00
Csanád Hajdú
4508f44af7
[libunwind] Add CMake option to enable execute-only code generation on AArch64 (#140554)
For a full toolchain supporting execute-only code generation the runtime
libraries also need to be pre-compiled with it enabled. The generic
`RUNTIMES_EXECUTE_ONLY_CODE` CMake option can now be used during build
configuration to enable execute-only code generation in libunwind.

Related RFC:
https://discourse.llvm.org/t/rfc-execute-only-code-support-for-runtime-libraries-on-aarch64/86180
2025-11-07 09:36:32 +01:00
Jack Styles
a9e6f90867
[libunwind][PAuthLR] Remove PC offset when using FEAT_PAuthLR (#164224)
When originally introduced to libunwind as part of #112171, FEAT_PAuthLR
had its Call Frame Instruction's (CFI's) in a different location to
other Signing Authentication methods. To incorporate this in libunwind,
a 4 byte offset was introduced to work with this. However, this design
was reversed in #121551 so the CFI's are emitted in the same location as
other methods. When making this change, the offset in libunwind was not
removed, so libunwind's PC value would be incorrect.

As the 4 byte offset is no longer needed, that adjustment can be
removed. results->ptrAuthDiversifier will still be set.
2025-10-29 08:20:11 +00:00
Brad Smith
f03ccef45f
[compiler-rt][libunwind] Allow for CET on OpenBSD (#164341) 2025-10-25 17:11:47 -04:00
Oliver Hunt
c1678e52f9
[PAC][libunwind] Fix gcc build of libunwind and compiler-rt (#164535)
This adds guards on the ptrauth feature checks so that they are only
performed if __has_feature is actually available.
2025-10-22 13:41:50 -07:00
Raul Tambre
c208a23643
[NFCI][asm][i386/x86-64] Enable AT&T syntax explicitly (#164453)
Implementation files using the Intel syntax explicitly specify it.
Do the same for the few files using AT&T syntax.

This also enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's Clang config files
(i.e. a global preference for Intel syntax).

No functional change intended.
2025-10-21 21:28:41 +03:00
Oliver Hunt
e6a1aff591
[runtimes][PAC] Harden unwinding when possible (#143230)
This hardens the unwinding logic and datastructures on systems
that support pointer authentication.

The approach taken to hardening is to harden the schemas of as many
high value fields in the myriad structs as possible, and then also
explicitly qualify local variables referencing privileged or security
critical values.

This does introduce ABI linkage between libcxx, libcxxabi, and
libunwind but those are in principle separate from the OS itself
so we've kept the schema definitions in the library specific headers
rather than ptrauth.h
2025-10-20 09:57:45 -07:00
Martin Storsjö
a17afee7ec
[libunwind] Fix aarch64 SEH unwinding with a debugger attached (#162867)
See https://github.com/LuaJIT/LuaJIT/issues/593#issuecomment-1717728494
for the original explanation of the problem.

In short; when a debugger is attached, there's a
function KiUserExceptionDispatcher in the stack that is being unwound.
The function KiUserExceptionDispatcher contains a CONTEXT, with a copy
of the context from where the exception was raised. When unwinding
through this function, this whole CONTEXT gets restored.

This CONTEXT is what we receive a pointer to in the callbacks, as the
ms_ctx pointer.

When we unwind manually using RtlUnwindEx, the unwinding overwrites the
CONTEXT that is passed to it. Thus, to avoid clobbering the CONTEXT that
needs to be restored by KiUserExceptionDispatcher, we could either
declare a new temporary CONTEXT on the stack before calling RtlUnwindEx,
or just use disp->ContextRecord as we already have available.

Fixes: https://github.com/llvm/llvm-project/issues/161851

Co-authored-by: Peter Cawley <corsix@corsix.org>
Co-authored-by: Hannes Domani <ssbssa@yahoo.de>
2025-10-16 22:47:08 +03:00
小钟
e6358ab75c
Fix typo: IsGlobaLinkage -> IsGlobalLinkage in XCOFF (#161960)
Corrects the spelling of 'IsGlobaLinkage' to 'IsGlobalLinkage' in
XCOFF-related code, comments, and tests across the codebase.
2025-10-12 12:03:40 -07:00
Arjun Ramesh
7e7c923b58
[WebAssembly] Support for new target wasm32-linux-muslwali (#162581)
Add toolchain support for the
[WALI](https://doc.rust-lang.org/rustc/platform-support/wasm32-wali-linux.html)
target as per its corresponding
[RFC](https://discourse.llvm.org/t/rfc-new-wasm-linux-target-support/88203)
2025-10-10 14:54:25 -07:00
Aiden Grossman
0c2913afc8
[libcxx] Use %{temp} instead of %T (#162323)
Based on review feedback in #160026.

This makes the substitution a lot more clear now that there is no
documentation around %T.

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2025-10-09 16:52:42 -07:00
Louis Dionne
4f80c064eb
[runtimes][NFC] Consistently declare main() functions in tests (#162548)
In the libc++ test suite, we consistently declare main() functions with
full parameters and explicitly return from the function. This helps code
that compiles the tests with -ffreestanding, where main() is not a
special function (with an implicit return and special mangling).

This patch fixes a few stray declarations, including in libunwind and
libc++abi.
2025-10-09 09:00:20 -04:00
Wu Yingcong
4aaf6d1b8c
[libunwind][test] Add check for objcopy to improve test compatibility (#161112)
Previously, we only used `objcopy`, which is not available for some
build configurations. With this patch, we not only try to use `objcopy`,
but also try to use `llvm-objcopy` if available.

This is a follow-up of https://github.com/llvm/llvm-project/pull/156383.
2025-10-02 07:42:43 +08:00
Jade Marker
a3d7c468bd
[Mips] Fixed libunwind::Registers_mips_o32::jumpto to allow for load delay (#152942)
Fix #152922

MIPS III also has load delay, so 
libunwind::Registers_mips_newabi::jumpto() is also fixed.
2025-09-25 09:20:25 +08:00
David Spickett
e85926545e
[libcxx][CI] Use lld for everything in the ARM picolib builds (#158320)
Our host compiler is a clang install that will default to ld if not told
otherwise.

We were telling meson to use lld, but the way that we did it was
outdated, which lead to picolib producing a linker script that lld could
not use. The tests were in fact linking with ld instead.

Using the `c_ld` setting fixes this problem. See:
https://mesonbuild.com/Machine-files.html#binaries

Then to use lld in tests we need `-fuse-ld=lld` in the config files.

Some of these options were not needed for clang 19.1.7, but were for
clang 21.1.1. We will soon update to 21.1.1 so I have included all of
the required options in this PR.
2025-09-15 09:20:58 +01:00
Wu Yingcong
1af19772e6
[libunwind][test] set fed test to require x86 as others arch may have cross toolchain build (#156383)
In https://github.com/llvm/llvm-project/pull/154902, the test failed
with llvm-clang-win-x-aarch64(it is a cross-build, which builds on
Windows and run on Linux, "Win to Aarch64 Linux Ubuntu Cross
Toolchain"), and objdump is not available on Windows(the build env).
Set to require x86 Linux instead.
2025-09-02 19:30:44 +08:00
Wu Yingcong
e57f0e928d
[libunwind] fix pc range condition check bug (#154902)
There is an off-by-one error with current condition check for PC fallen
into the range or not. There is another check within libunwind that use
the correct checks in
5050da7ba1/libunwind/src/UnwindCursor.hpp (L2757)
```
      if ((fdeInfo.pcStart <= pc) && (pc < fdeInfo.pcEnd))
```
2025-09-01 09:15:52 +08:00
Benjamin Maxwell
bfab8085af
[libunwind] Add support for the AArch64 "Vector Granule" (VG) register (#153565)
The vector granule (AArch64 DWARF register 46) is a pseudo-register that
contains the available size in bits of SVE vector registers in the
current call frame, divided by 64. The vector granule can be used in
DWARF expressions to describe SVE/SME stack frame layouts (e.g., the
location of SVE callee-saves).

The first time VG is evaluated (if not already set), it is initialized
to the result of evaluating a "CNTD" instruction (this assumes SVE is
available).

To support SME, the value of VG can change per call frame; this is
currently handled like any other callee-save and is intended to support
the unwind information implemented in #152283. This limits how VG is
used in the CFI information of functions with "streaming-mode changes"
(mode changes that change the SVE vector length), to make the unwinder's
job easier.
2025-08-21 10:01:40 +01:00
David Tenty
63195d3d7a
[NFC][CMake] quote ${CMAKE_SYSTEM_NAME} consistently (#154537)
A CMake change included in CMake 4.0 makes `AIX` into a variable
(similar to `APPLE`, etc.)
ff03db6657

However, `${CMAKE_SYSTEM_NAME}` unfortunately also expands exactly to
`AIX` and `if` auto-expands variable names in CMake. That means you get
a double expansion if you write:

`if (${CMAKE_SYSTEM_NAME}  MATCHES "AIX")`
which becomes:
`if (AIX  MATCHES "AIX")`
which is as if you wrote:
`if (ON MATCHES "AIX")`

You can prevent this by quoting the expansion of "${CMAKE_SYSTEM_NAME}",
due to policy
[CMP0054](https://cmake.org/cmake/help/latest/policy/CMP0054.html#policy:CMP0054)
which is on by default in 4.0+. Most of the LLVM CMake already does
this, but this PR fixes the remaining cases where we do not.
2025-08-20 12:45:41 -04:00
Alex Rønne Petersen
eb0d8f9272
[libunwind] Fix return type of DwarfFDECache::findFDE() in definition (#146308)
Needed to resolve this compilation error on some systems:

lib/libunwind/src/UnwindCursor.hpp:153:38: error: return type of
out-of-line definition of 'libunwind::DwarfFDECache::findFDE' differs
from that in the declaration
    typename A::pint_t DwarfFDECache<A>::findFDE(pint_t mh, pint_t pc) {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
lib/libunwind/src/libunwind.cpp:31:10: note: in file included from
lib/libunwind/src/libunwind.cpp:31:
    #include "UnwindCursor.hpp"
             ^
lib/libunwind/src/UnwindCursor.hpp💯17: note: previous declaration is
here
      static pint_t findFDE(pint_t mh, pint_t pc);
             ~~~~~~~^
2025-07-23 00:03:19 +02:00
Petr Hosek
9d3b60dea7
[libcxxabi][libunwind] Support for using LLVM libc (#134893)
This generalizes the support added in #99287 renaming the option to
RUNTIMES_USE_LIBC and integrating the module into libc++abi and
libunwind as well.
2025-07-09 00:48:50 -07:00
Khem Raj
b46f34452e
libunwind: Do not use __attribute__((target("gcs"))) with non-clang compilers (#138077)
This attribute is unsupported in GCC, so far it worked because before
GCC15 did not define this macros in _CHKFEAT_GCS in arm_acle.h [1]

With gcc15 compiler libunwind's check for this macros is succeeding and
it ends up enabling 'gcs' by using function attribute, this works with
clang but not with gcc.

We can see this in rust compiler bootstrap for aarch64/musl when system
uses gcc15, it ends up with these errors

Building libunwind.a for aarch64-poky-linux-musl
```
cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:191:1: error: arch extension 'gcs' should be prefixed by '+' cargo:warning=  191 | unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) {
cargo:warning=      | ^~~~~~~~~~~~~
cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:337:22: error: arch extension 'gcs' should be prefixed by '+'
cargo:warning=  337 |                      _Unwind_Stop_Fn stop, void *stop_parameter) {
cargo:warning=      |                      ^~~~~~~~~~~~~~~
```

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a6af707f0af

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-06-11 20:22:08 -07:00
Nikolas Klauser
c59cc2b690
[libunwind] Remove checks for -nostdlib++ (#143162)
libunwind uses a C linker, so it's never even trying to link against any
C++ libraries. This removes the code which tries to drop C++ libraries,
which makes the CMake configuration simpler and allows for upgrading
GCC.
2025-06-11 11:43:34 +02:00
Trung Nguyen
1d9ef8211f
[libunwind][Haiku] Fix signal frame unwinding (#135367)
The current unwinding implementation on Haiku is messy and broken.
1. It searches weird paths for private headers, which is breaking builds
in consuming projects, such as dotnet/runtime.
2. It does not even work, due to relying on incorrect private offsets.

This commit strips all references to private headers and ports a working
signal frame implementation. It has been tested against
`tests/signal_unwind.pass.cpp` and can go pass the signal frame.
2025-05-28 22:18:55 -04:00