mirror of
https://github.com/webmproject/libwebp.git
synced 2025-01-26 22:52:55 +01:00
96099a79a8
Since a376e7b9 Fix compilation on windows and clang-cl+ninja. the highest level assembly flag (/arch:AVX / -msse4.1) would be applied to all assembly files. This could result in higher level instructions being used which would defeat the runtime cpu detection check and could result in a crash. With this change -m style flags are used with clang-cl as it supports them and allows the correct level to be set. With at least Visual Studio 12 (2013)+ /arch is not necessary to build SSE2 or SSE4 code unless a lesser /arch is forced so these flags are avoided. This matches the nmake build. For emscripten only sse2 and sse4.1 are tested (NEON will succeed in being enabled, but fail to build). This is consistent with the current behavior added in: commit 36c81ff6a940f45b492e137b27eae7ff268c3cd8 WASM-SIMD: port 2 patches from rreverser@'s tree * Stop on first found SIMD version * Imply lower SSE version when higher is found Bug: webp:488 Change-Id: I34d01274e5204a477b6b9f35ed566048a62b4c57 Tested: msvc 2013-2019 debug win32/x64 builds; clang-cl under 2019