Cannot build on macOS if adding -mavx / -mavx2 to global build flags · Issue #194 · google/snappy · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ clang++ -DHAVE_CONFIG_H -I/Users/jcelerier/build-score-qt_rhi-Debug/3rdparty/snappy -I/Users/jcelerier/score/3rdparty/snappy -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -c /Users/jcelerier/score/3rdparty/snappy/snappy.cc -mssse3 -mavx2 -std=c++20
/Users/jcelerier/score/3rdparty/snappy/snappy.cc:1242:3: error: unknown type name '__m256i'
__m256i data = _mm256_lddqu_si256(static_cast<const __m256i *>(src));
^
/Users/jcelerier/score/3rdparty/snappy/snappy.cc:1242:55: error: unknown type name '__m256i'
__m256i data = _mm256_lddqu_si256(static_cast<const __m256i *>(src));
^
/Users/jcelerier/score/3rdparty/snappy/snappy.cc:1242:18: error: use of undeclared identifier '_mm256_lddqu_si256'; did you mean '_mm_lddqu_si128'?
__m256i data = _mm256_lddqu_si256(static_cast<const __m256i *>(src));
^~~~~~~~~~~~~~~~~~
_mm_lddqu_si128
It works if I add
#include <x86intrin.h>
at the top of snappy-internal.h:
#if SNAPPY_HAVE_SSSE3
// Please do not replace with <x86intrin.h> or with headers that assume more// advanced SSE versions without checking with all the OWNERS.
#include<emmintrin.h>
#include<tmmintrin.h>
#include<x86intrin.h>
#endif
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin24.0.0
The text was updated successfully, but these errors were encountered:
Repro:
It works if I add
at the top of snappy-internal.h:
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin24.0.0
The text was updated successfully, but these errors were encountered: