From d4fd9963634b581795a49a821394d89d8115d480 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Thu, 25 Mar 2021 09:14:53 +0100 Subject: Adapt Catch2 to Apple Silicon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- tests/auto/testlib/selftests/catch_p_p.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/auto') 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) -- cgit v1.2.3