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>
bb10
Andreas Buhr 2021-03-25 09:14:53 +01:00
parent d30f88cbf1
commit d4fd996363
1 changed files with 7 additions and 1 deletions

View File

@ -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)