use -mavx clang style options to enable SIMD for clang-cl
- Only use
/arch:AVXMSVC style options to enable SIMD when strictly MSVC cl; - Use
-mavxgcc/clang style options to enable SIMD when possible, for example clang-cl installed in MSVC; - Enable
C11forclang-cl; - Enable cpuinfo for
clang-cl;
Closes https://github.com/xiph/opus/issues/256
@wangyoucao577 can you add the same check for all other compiler flags regarding clang-cl frontend. (fast-math etc)
@wangyoucao577 can you add the same check for all other compiler flags regarding clang-cl frontend. (fast-math etc)
I checked all MSVC related options in current cmake, unfortunately -ffast-math can't work on clang-cl, it must be /fp:fast. Supported options(c11, cpuinfo) has been updated.
What's the status of this PR?
Is it the correct fix to enable avx everywhere? If you do that then it'll allow the compiler to use avx regardless of the intrinsic right?
Master branch is deleted and all pr's against master is closed. If this change is still relevant please reopen and repoint your PR to main branch.