brintos

brintos / llvm-project-archived public Read only

0
0
Text · 552 B · 18668c6 Raw
12 lines · plain
1macro(llvm_enable_language_nolink)2  # Set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY to disable linking3  # in the compiler sanity checks. When bootstrapping the toolchain,4  # the toolchain itself is still incomplete and sanity checks that include5  # linking may fail.6  set(__SAVED_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE})7  set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)8  enable_language(${ARGV})9  set(CMAKE_TRY_COMPILE_TARGET_TYPE ${__SAVED_TRY_COMPILE_TARGET_TYPE})10  unset(__SAVED_TRY_COMPILE_TARGET_TYPE)11endmacro()12