[NFC] Add CMake cache file for HLSL
authorChris Bieneman <chris.bieneman@me.com>
Wed, 13 Apr 2022 16:25:08 +0000 (11:25 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Wed, 13 Apr 2022 16:28:18 +0000 (11:28 -0500)
This just adds a trivial CMake cache file (which will grow over time)
to handle the common build configuration for the HLSL compiler.

clang/cmake/caches/HLSL.cmake [new file with mode: 0644]

diff --git a/clang/cmake/caches/HLSL.cmake b/clang/cmake/caches/HLSL.cmake
new file mode 100644 (file)
index 0000000..e2d02b6
--- /dev/null
@@ -0,0 +1,11 @@
+# Including the native target is important because some of LLVM's tests fail if
+# you don't.
+set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
+
+# Include the DirectX target for DXIL code generation, eventually we'll include
+# SPIR-V here too.
+set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD DirectX CACHE STRING "")
+
+# HLSL support is currently limted to clang, eventually it will expand to
+# clang-tools-extra too.
+set(LLVM_ENABLE_PROJECTS "clang" CACHE STRING "")