[LoongArch] Define the new-style reloc types
[llvm-project.git] / cmake / Modules / EnableLanguageNolink.cmake
blob18668c6d0476f1f52de48073c2b0d6422967afb8
1 macro(llvm_enable_language_nolink)
2   # Set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY to disable linking
3   # in the compiler sanity checks. When bootstrapping the toolchain,
4   # the toolchain itself is still incomplete and sanity checks that include
5   # 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)
11 endmacro()