libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
10.18k stars 1.86k forks source link

Remove SDL_build_config_emscripten.h? #11236

Open slouken opened 1 month ago

slouken commented 1 month ago

Are we still building emscripten outside of CMake?

icculus commented 1 month ago

I'm not, and I can't think of a reason why someone would want to.

Do we need it if someone just dumps all the source code into a different project and clicks "compile"? (Does that even work?!)

sezero commented 1 month ago

Removing should be safe.

sezero commented 1 month ago

The only remaining oddball is SDL_build_config_ngage.h I guess.

madebr commented 1 month ago

I was looking up how emscripten builds the SDL libraries, and it turns out they are using SDL_build_config_emscripten.h. https://github.com/emscripten-core/emscripten/blob/main/tools/ports/sdl2.py

slouken commented 1 month ago

I was looking up how emscripten builds the SDL libraries, and it turns out they are using SDL_build_config_emscripten.h. https://github.com/emscripten-core/emscripten/blob/main/tools/ports/sdl2.py

Is that going to continue with SDL3?

madebr commented 1 month ago

I dunno. @sbc100 Do you know?

sbc100 commented 1 month ago

We (emscripten) don't use cmake to build any of our ports (since we don't want make cmake a hard dependency), so we basically roll our own builds.

I certainly think it would be nicer to keep this config file upstream like this but ultimately we instead store it downstream ourselves if we must. Something like this: https://github.com/emscripten-core/emscripten/blob/b53978ee3f540dc74761eba127aa7f1b8761a125/tools/ports/libjpeg.py#L44-L62

slouken commented 1 month ago

@madebr, can we save the emscripten CI generated header in the build_config directory for the emscripten port? My only concern would be whether our CI environment matches upstream emscripten build environment.

@sbc100, do you have a preference here? It's probably safest if you keep things in sync on your end, but we can do a best effort here too.

sbc100 commented 1 month ago

I don't have a strong preference.

madebr commented 1 month ago

@madebr, can we save the emscripten CI generated header in the build_config directory for the emscripten port? My only concern would be whether our CI environment matches upstream emscripten build environment.

https://github.com/libsdl-org/SDL/pull/11326 adds those. For reference, this is the current SDL_build_config.h generated by emscripten on ci.

sbc100 commented 1 month ago

Thanks! That will be very useful when we update to SDL3.

madebr commented 1 month ago

Multithreaded emscripten is currently not part of the test matrix. Should it be added?