[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / tools / clang-linker-wrapper / CMakeLists.txt
blob88c19cad7b5321c66c9798e627b59121d81c7a5b
1 include(GNUInstallDirs)
3 set(LLVM_LINK_COMPONENTS 
4   ${LLVM_TARGETS_TO_BUILD}
5   BitWriter
6   Core
7   BinaryFormat
8   MC
9   Target
10   TransformUtils
11   Analysis
12   Passes
13   IRReader
14   Object
15   Option
16   Support
17   CodeGen
18   LTO)
20 set(LLVM_TARGET_DEFINITIONS LinkerWrapperOpts.td)
21 tablegen(LLVM LinkerWrapperOpts.inc -gen-opt-parser-defs)
22 add_public_tablegen_target(LinkerWrapperOpts)
24 if(NOT CLANG_BUILT_STANDALONE)
25   set(tablegen_deps intrinsics_gen LinkerWrapperOpts)
26 endif()
28 add_clang_executable(clang-linker-wrapper
29   ClangLinkerWrapper.cpp
30   OffloadWrapper.cpp
32   DEPENDS
33   ${tablegen_deps}
34   )
36 set(CLANG_LINKER_WRAPPER_LIB_DEPS
37   clangBasic
38   )
40 add_dependencies(clang clang-linker-wrapper)
42 target_link_libraries(clang-linker-wrapper
43   PRIVATE
44   ${CLANG_LINKER_WRAPPER_LIB_DEPS}
45   )
47 install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")