[libc++abi] Fix forced_unwind tests failures on ARM/EHABI targets.

Added __cxxabi_config.h includes to resolve _LIBCXXABI_ARM_EHABI and
proper building the forces_unwindX.cpp tests for the ARM/EHABI targets.

Differential Revision: https://reviews.llvm.org/D96378
This commit is contained in:
Vladimir Vereschaka 2021-02-12 13:58:41 -08:00
parent 7c749baa3a
commit c40b83199f
2 changed files with 10 additions and 4 deletions

View File

@ -15,9 +15,12 @@
#include <string.h>
#include <unwind.h>
#include <tuple>
#include <__cxxabi_config.h>
#if defined(_LIBCXXABI_ARM_EHABI)
int main() {}
int main(int, char**) {
return 0;
}
#else
static int bits = 0;
@ -74,7 +77,7 @@ static void test() {
}
}
int main() {
int main(int, char**) {
test();
return bits != 15;
}

View File

@ -16,9 +16,12 @@
#include <string.h>
#include <unwind.h>
#include <tuple>
#include <__cxxabi_config.h>
#if defined(_LIBCXXABI_ARM_EHABI)
int main() {}
int main(int, char**) {
return 0;
}
#else
template <typename T>
struct Stop;
@ -50,7 +53,7 @@ static void test() noexcept { forced_unwind(); }
static void terminate() { exit(0); }
int main() {
int main(int, char**) {
std::set_terminate(terminate);
try {
test();