-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add support for tcc to cmake #14464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for tcc to cmake #14464
Conversation
|
I see 3 issues with TInyCC, of which only the first one should be handled by this pr imho. The slow testatomic is also worthwhile to look into.
Using: |
|
Thanks a lot for taking a look. I have also noticed some warnings about macros being redefined that do not trigger when using gcc or clang: Probably harmless but I thought I'd mention it anyway. |
|
It's not urgent, but I do think it would be cool if we could squeeze this into 3.4.0. |
I see those too.
tinycc is thus correct in emitting a warning. Not 100% sure why gcc isn't. Maybe because they are system headers or SDL adds those paths through |
This commit was dropped, as I changed the values in question to defines. I never realized until now that declaring something as |
68275bb to
a6ff1e8
Compare
|
Rebased on current main so it can be built with tinycc :) With the |
|
Yeah, and this is more for iteration and special-case projects..."serious" things will build with gcc, clang, msvc, whatever. So 10% loss on that compiler is acceptable. |
Tne |
This PR adds support to the cmake build scripts so to allow building SDL with the Tiny C Compiler (tcc).
Description
TinyCC supports the subset of C99 used by SDL and will complete the build once the --version-script linker flag is removed. One other small fix was needed in SDL_waylandevents.c to achieve a successful build. 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.
Changes:
cmake/sdlcompilers.cmake:
CMakeLists.txt:
src/video/wayland/SDL_waylandevents.c:
Existing Issue(s)
Related to #14300