Commit 0078db38 authored by Brad King's avatar Brad King
Browse files

ARMClang: Separate cpu/arch flags from preceding flags

Suggested-by: Kim Kryger
parent 02fbe408
......@@ -89,12 +89,12 @@ macro(__compiler_armclang lang)
else()
__armclang_check_processor("${CMAKE_SYSTEM_ARCH}" "${CMAKE_${lang}_COMPILER_ARCH_LIST}" _CMAKE_${lang}_CHECK_ARCH_RESULT)
if( _CMAKE_${lang}_CHECK_ARCH_RESULT)
string(APPEND CMAKE_${lang}_FLAGS_INIT "-march=${CMAKE_SYSTEM_ARCH}")
string(APPEND CMAKE_${lang}_FLAGS_INIT " -march=${CMAKE_SYSTEM_ARCH}")
set(__march_flag_set TRUE)
endif()
__armclang_check_processor("${CMAKE_SYSTEM_PROCESSOR}" "${CMAKE_${lang}_COMPILER_PROCESSOR_LIST}" _CMAKE_${lang}_CHECK_PROCESSOR_RESULT)
if(_CMAKE_${lang}_CHECK_PROCESSOR_RESULT)
string(APPEND CMAKE_${lang}_FLAGS_INIT "-mcpu=${CMAKE_SYSTEM_PROCESSOR}")
string(APPEND CMAKE_${lang}_FLAGS_INIT " -mcpu=${CMAKE_SYSTEM_PROCESSOR}")
set(__mcpu_flag_set TRUE)
endif()
if(NOT __march_flag_set AND NOT __mcpu_flag_set)
......@@ -111,7 +111,7 @@ macro(__compiler_armclang lang)
list(TRANSFORM CMAKE_LINKER_CPU_LIST TOLOWER)
__armclang_check_processor("${CMAKE_SYSTEM_PROCESSOR}" "${CMAKE_LINKER_CPU_LIST}" _CMAKE_CHECK_LINK_CPU_RESULT)
if(_CMAKE_CHECK_LINK_CPU_RESULT)
string(APPEND CMAKE_${lang}_LINK_FLAGS "--cpu=${CMAKE_SYSTEM_PROCESSOR}")
string(APPEND CMAKE_${lang}_LINK_FLAGS " --cpu=${CMAKE_SYSTEM_PROCESSOR}")
endif()
if(__CMAKE_ARMClang_USING_armlink)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment