Require haswell as minimum instruction set.
This can be overriden with DEFAULT_VESPA_CPU_ARCH_FLAGS when running cmake.
Require skylake: cmake -DDEFAULT_VESPA_CPU_ARCH_FLAGS="-march=skylake" .
Require sandybridge: cmake -DDEFAULT_VESPA_CPU_ARCH_FLAGS="-march=skylake" .
Or any other cpu architecture supported by gcc.
@@ -130,10 +130,8 @@ function(vespa_use_default_build_settings)
message("-- CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
if(APPLE AND (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")))
- elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-march=westmere -mtune=haswell")
else()
- set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-mtune=intel")
+ set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-march=haswell")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(DEFAULT_VESPA_CPU_ARCH_FLAGS "-march=armv8.2-a+fp16+rcpc+dotprod+crypto -mtune=neoverse-n1")
