summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2021-03-25 09:14:53 +0100
committerAndreas Buhr <andreas.buhr@qt.io>2021-03-25 12:06:31 +0100
commitd4fd9963634b581795a49a821394d89d8115d480 (patch)
treea11a5c67613fc04b719453a19818965ae95c1b60 /tests/auto/testlib
parentd30f88cbf1f128def324532baf7018787d527410 (diff)
Adapt Catch2 to Apple Silicon
We are still using Catch2 2.11.3 which is not adapted to Apple silicon yet. This patch backports the required change from Catch v3.0.0-preview.3. Change-Id: Ifa14a1fdd6cd1f661c94a0a78648cb01bd9699c1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/catch_p_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/catch_p_p.h b/tests/auto/testlib/selftests/catch_p_p.h
index 97ce7a24fd..596bfe63dd 100644
--- a/tests/auto/testlib/selftests/catch_p_p.h
+++ b/tests/auto/testlib/selftests/catch_p_p.h
@@ -7872,7 +7872,13 @@ namespace Catch {
#ifdef CATCH_PLATFORM_MAC
- #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
+ // taken from Catch v3.0.0-preview.3
+ #if defined(__i386__) || defined(__x86_64__)
+ #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
+ #elif defined(__aarch64__)
+ #define CATCH_TRAP() __asm__(".inst 0xd4200000")
+ #endif
+ // end taken from Catch v3.0.0-preview.3
#elif defined(CATCH_PLATFORM_IPHONE)