diff options
Diffstat (limited to 'lib/CodeGen/GlobalISel/CMakeLists.txt')
-rw-r--r-- | lib/CodeGen/GlobalISel/CMakeLists.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/CodeGen/GlobalISel/CMakeLists.txt b/lib/CodeGen/GlobalISel/CMakeLists.txt new file mode 100644 index 000000000000..e3e81ae5c4b1 --- /dev/null +++ b/lib/CodeGen/GlobalISel/CMakeLists.txt @@ -0,0 +1,27 @@ +# List of all GlobalISel files. +set(GLOBAL_ISEL_FILES + IRTranslator.cpp + MachineIRBuilder.cpp + RegBankSelect.cpp + RegisterBank.cpp + RegisterBankInfo.cpp + ) + +# Add GlobalISel files to the dependencies if the user wants to build it. +if(LLVM_BUILD_GLOBAL_ISEL) + set(GLOBAL_ISEL_BUILD_FILES ${GLOBAL_ISEL_FILES}) +else() + set(GLOBAL_ISEL_BUILD_FILES"") + set(LLVM_OPTIONAL_SOURCES LLVMGlobalISel ${GLOBAL_ISEL_FILES}) +endif() + + +# In LLVMBuild.txt files, it is not possible to mark a dependency to a +# library as optional. So instead, generate an empty library if we did +# not ask for it. +add_llvm_library(LLVMGlobalISel + ${GLOBAL_ISEL_BUILD_FILES} + GlobalISel.cpp + ) + +add_dependencies(LLVMGlobalISel intrinsics_gen) |