mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-23 18:53:08 +08:00
Add support for tcc to cmake (#14464)
This PR adds support to the cmake build scripts so to allow building SDL with the Tiny C Compiler (tcc). TinyCC supports the subset of C99 used by SDL and will complete the build once the --version-script linker flag is removed. The changes have been tested with various build configurations, including X11 and Wayland, and using tcc version 0.9.28rc 2025-10-27 mob@f4e01bfc on x86_64 Linux.
This commit is contained in:
@@ -136,7 +136,7 @@ extern "C" {
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif SDL_HAS_BUILTIN(__builtin_trap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_trap()
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#elif (defined(__GNUC__) || defined(__clang__) || defined(__TINYC__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||
|
||||
Reference in New Issue
Block a user