Ensure --target and -mcpu/-mfpu/-mtune are set appropriately when building with clang targeting arm64/aarch64. Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
15 lines
464 B
CMake
15 lines
464 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
if(DEFINED GCC_M_CPU)
|
|
list(APPEND TOOLCHAIN_C_FLAGS -mcpu=${GCC_M_CPU})
|
|
list(APPEND TOOLCHAIN_LD_FLAGS -mcpu=${GCC_M_CPU})
|
|
endif()
|
|
|
|
if(DEFINED GCC_M_ARCH)
|
|
list(APPEND TOOLCHAIN_C_FLAGS -march=${GCC_M_ARCH})
|
|
list(APPEND TOOLCHAIN_LD_FLAGS -march=${GCC_M_ARCH})
|
|
endif()
|
|
|
|
if(DEFINED GCC_M_TUNE)
|
|
list(APPEND TOOLCHAIN_C_FLAGS -mtune=${GCC_M_TUNE})
|
|
list(APPEND TOOLCHAIN_LD_FLAGS -mtune=${GCC_M_TUNE})
|
|
endif()
|