Allow -march=native with clang

This commit is contained in:
Konstantin Podshumok 2020-08-08 00:28:10 +03:00 committed by GitHub
parent 8f16c542b6
commit df79f415ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,10 +176,7 @@ if(NOT DISABLE_CPU_OPTIMIZE)
include(cmake/cpu_features.cmake)
endif()
if(NOT COMPILER_CLANG) # clang: error: the clang compiler does not support '-march=native'
option(ARCH_NATIVE "Enable -march=native compiler flag" ${ARCH_ARM})
endif()
option(ARCH_NATIVE "Enable -march=native compiler flag" ${ARCH_ARM})
if (ARCH_NATIVE)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=native")
endif ()