jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6.45k stars 416 forks source link

Disable -mfpmath=sse for emscripten builds #1190

Closed guusw closed 1 month ago

guusw commented 1 month ago

Hey, first of all thank you for creating this, I'm currently integrating this into our game creation tool and so far it's been great to work with :)

Just a little change I had make to compile the library with emscripten since -mfpmath doesn't seem to be a valid compile flag. Aside from having to set USE_SSE4_1 externally and enable web simd with -msimd128

mihe commented 1 month ago

If you update your branch to latest you'll find that this was fixed in 6e0b867a2 already.

You also now have the USE_WASM_SIMD CMake option as of 256a61aee, which will add the relevant SIMD flags for you, so you don't have to pass -msimd128 or set USE_SSE4_1 anymore.

jrouwe commented 1 month ago

@guusw I think mihe is right and this PR can be closed. Let me know if there are any issues still.