-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Use regular -I include flag for SDL paths
#17475
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
Conversation
dschuff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the difference between the 2 sdl-config examples in the commit description?
|
One is for SDL2 and one is for SDL (v1) |
2228cf7 to
c63cf8f
Compare
|
I had to do a little more refactoring to prevent clang from warning about passing |
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taked from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taked from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taked from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
emcc.py
Outdated
| flags += ['-mllvm', a] | ||
|
|
||
| # relaxed-simd implies simd128. | ||
| if '-mrelaxed-simd' in user_args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated to this change, but what's the difference between flags and user_args?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user_args is what was supplied on the command line but the user. flags is the flags we are generating to pass to clang.
It does looks like the line below is doing the wrong thing here.. but its not related to this change. I will investigate separately.
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taked from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taked from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taked from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
I noticed that we lacked such a thing while working on #17475. It turns out that system header are technically allowed to redefine macros without generating a warning, but when I made the SDL header tree into a normal `-I` path I noticed that `M_PI` was being duplicately defined because we were not defining `HAVE_M_PI`. This list of defines is taken from `SDL_config_iphoneos.h` and a visual inspection seems to confirm that we do indeed support all the specified features.
When SDL it used on the desktop the SDL include paths are injected in this way: ``` $ sdl-config --cflags -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT $ sdl2-config --cflags -I/usr/include/SDL2 -D_REENTRANT ``` Its also the way to add include paths for all the other ports. As part of this I also refactored the generation of C flags such that we don't pass `-I` flags when building `.i`/`.ii` files. These files are considered to be already pre-processed and clang warns if you pass `-I` flags when compiling them.
When SDL it used on the desktop the SDL include paths are injected
in this way:
Its also the way to add include paths for all the other ports.