mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[host] cmake: use -march=x86-64-v2 when it becomes available
GCC 11 will support x86_64 micro-architecture feature levels. What we really want to support is nehalem or newer, which is x86-64-v2, and specifying this instead of nehalem means that we are not tuning for nehalem specifically.
This commit is contained in:
parent
f5ad14b109
commit
0525515bee
@ -16,12 +16,17 @@ if(OPTIMIZE_FOR_NATIVE)
|
|||||||
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||||
add_compile_options("-march=native")
|
add_compile_options("-march=native")
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
CHECK_C_COMPILER_FLAG("-march=x86-64-v2" COMPILER_SUPPORTS_MARCH_X86_64_V2)
|
||||||
|
if(COMPILER_SUPPORTS_MARCH_X86_64_V2)
|
||||||
|
add_compile_options("-march=x86-64-v2")
|
||||||
else()
|
else()
|
||||||
CHECK_C_COMPILER_FLAG("-march=nehalem" COMPILER_SUPPORTS_MARCH_NEHALEM)
|
CHECK_C_COMPILER_FLAG("-march=nehalem" COMPILER_SUPPORTS_MARCH_NEHALEM)
|
||||||
if(COMPILER_SUPPORTS_MARCH_NEHALEM)
|
if(COMPILER_SUPPORTS_MARCH_NEHALEM)
|
||||||
add_compile_options("-march=nehalem")
|
add_compile_options("-march=nehalem")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
option(ENABLE_BACKTRACE "Enable backtrace support on crash" ON)
|
option(ENABLE_BACKTRACE "Enable backtrace support on crash" ON)
|
||||||
add_feature_info(ENABLE_BACKTRACE ENABLE_BACKTRACE "Backtrace support.")
|
add_feature_info(ENABLE_BACKTRACE ENABLE_BACKTRACE "Backtrace support.")
|
||||||
|
Loading…
Reference in New Issue
Block a user