Skip to content

Commit

Permalink
Fix build issue on Apple M1 with AppleClang
Browse files Browse the repository at this point in the history
 - Currently catch2 is header directly added in the project
 - Before switching to submodule (in separate PR), copying
   minimal fix from the upstream: catchorg/Catch2#1971

Fixes #527
  • Loading branch information
pramodk committed Feb 27, 2021
1 parent 791b8a1 commit f77943d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/catch/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,11 @@ namespace Catch {

#ifdef CATCH_PLATFORM_MAC

#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
#if defined(__i386__) || defined(__x86_64__)
#define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */
#elif defined(__aarch64__)
#define CATCH_TRAP() __asm__(".inst 0xd4200000")
#endif

#elif defined(CATCH_PLATFORM_LINUX)
// If we can use inline assembler, do it because this allows us to break
Expand Down

0 comments on commit f77943d

Please sign in to comment.