Skip to content

Commit

Permalink
only use neon on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed Sep 18, 2024
1 parent 4ce3b51 commit ea5112f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
9 changes: 2 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,8 @@ if(NOT MSVC)
endif()
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -DDEBUG -Wall ${M32_FLAG} ${CXX_EXTRA}")
if(NOT IS_ARM)
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -DNDEBUG ${M32_FLAG} ${CXX_EXTRA}")
else()
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG ${M32_FLAG} ${CXX_EXTRA}")
endif()
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG ${M32_FLAG} ${CXX_EXTRA}")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_LTO)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=${CMAKE_LTO}")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_LTO)
Expand Down
7 changes: 2 additions & 5 deletions third_party/snappy/snappy-stubs-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@
#define HAVE_BUILTIN_PREFETCH 1
#endif

#if defined(__aarch64__) || defined(__ARM_ARCH)
#if defined(__aarch64__)
// These are enabled by default on aarch64
#define SNAPPY_HAVE_NEON 1
#define SNAPPY_HAVE_NEON_CRC32 1
#else
#define SNAPPY_HAVE_SSSE3 1
#define SNAPPY_HAVE_X86_CRC32 1
#define SNAPPY_HAVE_BMI2 1
#endif

#if HAVE_SYS_MMAN_H
Expand Down

0 comments on commit ea5112f

Please sign in to comment.