forked from OSchip/llvm-project
[compiler-rt][builtins] Fix CMake builtin target flag
clang-cl doesn't support -target <target>, instead it only supports --target=<target> so building a RUNTIME configuration for clang-cl ended up in never building builtins. Which in turn lead to clang-cl not being able to find the runtime libraries because we depend on the compiler_rt.builtins.lib being in the runtime dir for the Driver to add it as a candidate. I don't think this should have any downsides since most the code these days are using --target=<target> instead of the old syntax. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D120308
This commit is contained in:
parent
a5bbc6ef99
commit
8182dba0c2
|
@ -46,7 +46,7 @@ function(try_compile_only output)
|
|||
|
||||
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}")
|
||||
|
|
Loading…
Reference in New Issue