diff --git a/flake.nix b/flake.nix index 605a2ea5..bd21d64b 100644 --- a/flake.nix +++ b/flake.nix @@ -37,8 +37,8 @@ reproducibleBuild = false; # Use custom attributes to set compiler flags - CFLAGS = if enableOptimizations then "-O3 -march=native" else ""; - CXXFLAGS = if enableOptimizations then "-O3 -march=native" else ""; + CFLAGS = if enableOptimizations then "-Ofast -march=x86-64-v3" else ""; + CXXFLAGS = if enableOptimizations then "-Ofast -march=x86-64-v3" else ""; postPatch = '' mkdir -p include diff --git a/src/common/wflign/CMakeLists.txt b/src/common/wflign/CMakeLists.txt index 92f62ad1..856cd3fc 100644 --- a/src/common/wflign/CMakeLists.txt +++ b/src/common/wflign/CMakeLists.txt @@ -20,8 +20,8 @@ endif() message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") if (${CMAKE_BUILD_TYPE} MATCHES Release) - #set(EXTRA_FLAGS "-Ofast -march=native -flto -fno-fat-lto-objects") - set(EXTRA_FLAGS "-Ofast -march=native") + #set(EXTRA_FLAGS "-Ofast -march=x86-64-v3 -flto -fno-fat-lto-objects") + set(EXTRA_FLAGS "-Ofast -march=x86-64-v3") set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") # reset CXX_FLAGS to replace -O3 with -Ofast endif () diff --git a/src/common/wflign/deps/WFA2-lib/CMakeLists.txt b/src/common/wflign/deps/WFA2-lib/CMakeLists.txt index acb3d906..8adab8a2 100644 --- a/src/common/wflign/deps/WFA2-lib/CMakeLists.txt +++ b/src/common/wflign/deps/WFA2-lib/CMakeLists.txt @@ -55,7 +55,7 @@ if(NOT CMAKE_BUILD_TYPE) endif() if (${CMAKE_BUILD_TYPE} MATCHES Release) - set(OPTIMIZE_FLAGS "${OPTIMIZE_FLAGS} -march=native -D_FILE_OFFSET_BITS=64") + set(OPTIMIZE_FLAGS "${OPTIMIZE_FLAGS} -march=x86-64-v3") endif() if ((${CMAKE_BUILD_TYPE} MATCHES Release) OR (${CMAKE_BUILD_TYPE} MATCHES RelWithDebInfo)) diff --git a/src/common/wflign/deps/WFA2-lib/Makefile b/src/common/wflign/deps/WFA2-lib/Makefile index 69bb5762..0e04e05a 100644 --- a/src/common/wflign/deps/WFA2-lib/Makefile +++ b/src/common/wflign/deps/WFA2-lib/Makefile @@ -45,7 +45,7 @@ ifeq ($(BUILD_EXAMPLES),1) APPS+=examples endif -all: CC_FLAGS+=-O3 -march=native #-flto -ffat-lto-objects +all: CC_FLAGS+=-O3 -march=x86-64-v3 #-flto -ffat-lto-objects all: build debug: build