Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/libunicode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ endif()


if(LIBUNICODE_SIMD_IMPLEMENTATION STREQUAL "std" OR LIBUNICODE_SIMD_IMPLEMENTATION STREQUAL "intrinsics")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
# Normalize the processor name: it is "x86_64" on Linux, "AMD64" on Windows,
# and "amd64" on FreeBSD/other BSDs. A case-sensitive match missed the BSD
# spelling, so the SSE4.1/AVX flags below were never applied while the x86
# intrinsics in intrinsics.h (gated on __x86_64__) were still compiled,
# breaking the FreeBSD build with always_inline SSE4.1 errors.
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _LIBUNICODE_PROCESSOR_LOWER)
if(_LIBUNICODE_PROCESSOR_LOWER STREQUAL "x86_64" OR _LIBUNICODE_PROCESSOR_LOWER STREQUAL "amd64")
set(LIBUNICODE_SIMD_SOURCES
simd_detector.cpp
scan256.cpp
Expand Down
Loading