diff --git a/compiler-rt/cmake/Modules/BuiltinTests.cmake b/compiler-rt/cmake/Modules/BuiltinTests.cmake --- a/compiler-rt/cmake/Modules/BuiltinTests.cmake +++ b/compiler-rt/cmake/Modules/BuiltinTests.cmake @@ -46,7 +46,7 @@ set(TRY_COMPILE_FLAGS "${ARG_FLAGS}") if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET) - list(APPEND TRY_COMPILE_FLAGS "-target ${CMAKE_C_COMPILER_TARGET}") + list(APPEND TRY_COMPILE_FLAGS "--target=${CMAKE_C_COMPILER_TARGET}") endif() string(REPLACE ";" " " extra_flags "${TRY_COMPILE_FLAGS}")