summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-11-17 04:36:59 +0000
committerChris Bieneman <beanz@apple.com>2016-11-17 04:36:59 +0000
commitfb21e4d6fc9ff15b231354be4068c3f732deee02 (patch)
tree1966ebc0d87d10abd6b835cc996db5b4e6ac538f /CMakeLists.txt
parent92cb3eecbd9ba49ef04ed1b0cd70c549cace5d4c (diff)
[CMake] [Darwin] Add support for debugging tablegen dependencies
This patch adds an option to the build system LLVM_DEPENDENCY_DEBUGGING. Over time I plan to extend this to do more complex verifications, but the initial patch causes compile errors wherever there is missing a dependency on intrinsics_gen. Because intrinsics_gen is a compile-time dependency not a link-time dependency, everything that relies on the headers generated in intrinsics_gen needs an explicit dependency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f67fd23860e6..1f301bddaf4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,6 +151,20 @@ if(LLVM_CCACHE_BUILD)
endif()
endif()
+option(LLVM_DEPENDENCY_DEBUGGING "Dependency debugging mode to verify correctly expressed library dependencies (Darwin only)" OFF)
+
+# Some features of the LLVM build may be disallowed when dependency debugging is
+# enabled. In particular you cannot use ccache because we want to force compile
+# operations to always happen.
+if(LLVM_DEPENDENCY_DEBUGGING)
+ if(NOT CMAKE_HOST_APPLE)
+ message(FATAL_ERROR "Dependency debugging is only currently supported on Darwin hosts.")
+ endif()
+ if(LLVM_CCACHE_BUILD)
+ message(FATAL_ERROR "Cannot enable dependency debugging while using ccache.")
+ endif()
+endif()
+
option(LLVM_BUILD_GLOBAL_ISEL "Experimental: Build GlobalISel" OFF)
if(LLVM_BUILD_GLOBAL_ISEL)
add_definitions(-DLLVM_BUILD_GLOBAL_ISEL)