[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
GitOrigin-RevId: c40b83199f01f36647b083dfd353d92134bc4973
diff --git a/test/forced_unwind1.pass.cpp b/test/forced_unwind1.pass.cpp
index b98f572..8f06f84 100644
--- a/test/forced_unwind1.pass.cpp
+++ b/test/forced_unwind1.pass.cpp
@@ -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 @@
}
}
-int main() {
+int main(int, char**) {
test();
return bits != 15;
}
diff --git a/test/forced_unwind2.pass.cpp b/test/forced_unwind2.pass.cpp
index ee11b69..db57ecc 100644
--- a/test/forced_unwind2.pass.cpp
+++ b/test/forced_unwind2.pass.cpp
@@ -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 terminate() { exit(0); }
-int main() {
+int main(int, char**) {
std::set_terminate(terminate);
try {
test();