fix: guard __cdecl __debugbreak behind PDB_COMPILER_MSVC for Linux build

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
IChooseYou
2026-02-22 07:33:36 -07:00
parent df1435d9b7
commit 48409d1d38

View File

@@ -11,10 +11,14 @@ PDB_PUSH_WARNING_CLANG
PDB_DISABLE_WARNING_CLANG("-Wgnu-zero-variadic-macro-arguments")
PDB_DISABLE_WARNING_CLANG("-Wreserved-identifier")
extern "C" void __cdecl __debugbreak(void);
#if PDB_COMPILER_MSVC
extern "C" void __cdecl __debugbreak(void);
# pragma intrinsic(__debugbreak)
#elif defined(__has_builtin) && __has_builtin(__builtin_debugtrap)
# define __debugbreak() __builtin_debugtrap()
#else
# include <signal.h>
# define __debugbreak() raise(SIGTRAP)
#endif