xref: /llvm-project/llvm/lib/CMakeLists.txt (revision dbae7176a6ecf558dc5e92016cdda387c9d74d66)
1include(LLVM-Build)
2
3# `Demangle', `Support' and `TableGen' libraries are added on the top-level
4# CMakeLists.txt
5
6add_subdirectory(IR)
7add_subdirectory(FuzzMutate)
8add_subdirectory(FileCheck)
9add_subdirectory(InterfaceStub)
10add_subdirectory(IRPrinter)
11add_subdirectory(IRReader)
12add_subdirectory(CGData)
13add_subdirectory(CodeGen)
14add_subdirectory(CodeGenTypes)
15add_subdirectory(BinaryFormat)
16add_subdirectory(Bitcode)
17add_subdirectory(Bitstream)
18add_subdirectory(DWARFLinker)
19add_subdirectory(Extensions)
20add_subdirectory(Frontend)
21add_subdirectory(Transforms)
22add_subdirectory(Linker)
23add_subdirectory(Analysis)
24add_subdirectory(LTO)
25add_subdirectory(MC)
26add_subdirectory(MCA)
27add_subdirectory(ObjCopy)
28add_subdirectory(Object)
29add_subdirectory(ObjectYAML)
30add_subdirectory(Option)
31add_subdirectory(Remarks)
32add_subdirectory(Debuginfod)
33add_subdirectory(DebugInfo)
34add_subdirectory(DWP)
35add_subdirectory(ExecutionEngine)
36add_subdirectory(Target)
37add_subdirectory(SandboxIR)
38add_subdirectory(AsmParser)
39add_subdirectory(LineEditor)
40add_subdirectory(ProfileData)
41add_subdirectory(Passes)
42add_subdirectory(TargetParser)
43add_subdirectory(TextAPI)
44add_subdirectory(Telemetry)
45add_subdirectory(ToolDrivers)
46add_subdirectory(XRay)
47if (LLVM_INCLUDE_TESTS)
48  add_subdirectory(Testing)
49endif()
50add_subdirectory(WindowsDriver)
51add_subdirectory(WindowsManifest)
52
53set(LLVMCONFIGLIBRARYDEPENDENCIESINC "${LLVM_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc")
54
55# Special components which don't have any source attached but aggregate other
56# components
57add_llvm_component_group(all-targets LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD})
58add_llvm_component_group(Engine)
59
60# The native target may not be enabled when cross compiling
61if(TARGET ${LLVM_NATIVE_ARCH})
62  add_llvm_component_group(Native LINK_COMPONENTS ${LLVM_NATIVE_ARCH})
63  add_llvm_component_group(NativeCodeGen LINK_COMPONENTS ${LLVM_NATIVE_ARCH}CodeGen)
64else()
65  add_llvm_component_group(Native)
66  add_llvm_component_group(NativeCodeGen)
67endif()
68
69# Component post-processing
70LLVMBuildResolveComponentsLink()
71LLVMBuildGenerateCFragment(OUTPUT ${LLVMCONFIGLIBRARYDEPENDENCIESINC})
72