Skip to content

Commit 4e29148

Browse files
committed
[compiler-rt][CMake] Simplify ARM VFP check
`TARGET_${arch}_CFLAGS` is expanded into `CMAKE_REQUIRED_FLAGS`, which is implicitly added to the flags by `check_compile_definition`. We don't need to re-expand the `TARGET_${arch}_CFLAGS` variable again.
1 parent c6023ce commit 4e29148

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,7 @@ else ()
862862
message(STATUS "Performing additional configure checks with target flags: ${CMAKE_REQUIRED_FLAGS}")
863863
# For ARM archs, exclude any VFP builtins if VFP is not supported
864864
if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
865-
string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
866-
check_compile_definition(__ARM_FP "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
865+
check_compile_definition(__ARM_FP "${CMAKE_C_FLAGS}" COMPILER_RT_HAS_${arch}_VFP)
867866
if(NOT COMPILER_RT_HAS_${arch}_VFP)
868867
list(REMOVE_ITEM ${arch}_SOURCES ${arm_Thumb1_VFPv2_DP_SOURCES} ${arm_Thumb1_VFPv2_SP_SOURCES} ${arm_Thumb1_SjLj_EH_SOURCES})
869868
else()

0 commit comments

Comments
 (0)