Skip to content

Commit

Permalink
Use armv8a+crc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jul 12, 2024
1 parent 40f0da1 commit 7d9b876
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ else()

if(NOT WIN32 AND NOT APPLE AND ARCH STREQUAL "aarch64")
# on arm64 linux, we set a minimum of armv8
target_compile_options(${bun} PUBLIC -march=armv8-a -mtune=ampere1)
target_compile_options(${bun} PUBLIC -march=armv8-a+crc -mtune=ampere1)
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BREW_PREFIX_PATH = /opt/homebrew
DEFAULT_MIN_MACOS_VERSION = 11.0
MARCH_NATIVE = -mtune=$(CPU_TARGET)
ifeq ($(OS_NAME),linux)
MARCH_NATIVE = -march=armv8-a -mtune=ampere1
MARCH_NATIVE = -march=armv8-a+crc -mtune=ampere1
endif
else
ARCH_NAME = x64
Expand Down
4 changes: 2 additions & 2 deletions scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export CFLAGS='-O3 -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidd
export CXXFLAGS='-O3 -fno-exceptions -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer'

if [[ $(uname -s) == 'Linux' && ($(uname -m) == 'aarch64' || $(uname -m) == 'arm64') ]]; then
export CFLAGS="$CFLAGS -march=armv8-a -mtune=ampere1 "
export CXXFLAGS="$CXXFLAGS -march=armv8-a -mtune=ampere1 "
export CFLAGS="$CFLAGS -march=armv8-a+crc -mtune=ampere1 "
export CXXFLAGS="$CXXFLAGS -march=armv8-a+crc -mtune=ampere1 "
fi

export CMAKE_FLAGS=(
Expand Down

0 comments on commit 7d9b876

Please sign in to comment.