Skip to content

[HLSL][CMake] Add clangd and distribution settings #92011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 17, 2024

Conversation

llvm-beanz
Copy link
Collaborator

This just adds some simple distribution settings and includes clangd in the build for distribution.

This just adds some simple distribution settings and includes clangd in
the build for distribution.
@llvm-beanz llvm-beanz requested a review from bob80905 May 13, 2024 18:57
@llvmbot llvmbot added clang Clang issues not falling into any other category HLSL HLSL Language Support labels May 13, 2024
@llvmbot
Copy link
Member

llvmbot commented May 13, 2024

@llvm/pr-subscribers-clang

Author: Chris B (llvm-beanz)

Changes

This just adds some simple distribution settings and includes clangd in the build for distribution.


Full diff: https://github.com/llvm/llvm-project/pull/92011.diff

1 Files Affected:

  • (modified) clang/cmake/caches/HLSL.cmake (+5-1)
diff --git a/clang/cmake/caches/HLSL.cmake b/clang/cmake/caches/HLSL.cmake
index 84850c86f12cd..9aa28625ab81e 100644
--- a/clang/cmake/caches/HLSL.cmake
+++ b/clang/cmake/caches/HLSL.cmake
@@ -8,6 +8,10 @@ set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "DirectX;SPIRV" 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 "")
+set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra" CACHE STRING "")
 
 set(CLANG_ENABLE_HLSL On CACHE BOOL "")
+
+set(LLVM_DISTRIBUTION_COMPONENTS
+    "clang;hlsl-resource-headers;clangd"
+    CACHE STRING "")

@llvmbot
Copy link
Member

llvmbot commented May 13, 2024

@llvm/pr-subscribers-hlsl

Author: Chris B (llvm-beanz)

Changes

This just adds some simple distribution settings and includes clangd in the build for distribution.


Full diff: https://github.com/llvm/llvm-project/pull/92011.diff

1 Files Affected:

  • (modified) clang/cmake/caches/HLSL.cmake (+5-1)
diff --git a/clang/cmake/caches/HLSL.cmake b/clang/cmake/caches/HLSL.cmake
index 84850c86f12cd..9aa28625ab81e 100644
--- a/clang/cmake/caches/HLSL.cmake
+++ b/clang/cmake/caches/HLSL.cmake
@@ -8,6 +8,10 @@ set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "DirectX;SPIRV" 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 "")
+set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra" CACHE STRING "")
 
 set(CLANG_ENABLE_HLSL On CACHE BOOL "")
+
+set(LLVM_DISTRIBUTION_COMPONENTS
+    "clang;hlsl-resource-headers;clangd"
+    CACHE STRING "")

Copy link
Contributor

@bogner bogner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including clang-tools-extra makes sense to me. Setting up the distribution may not be as universal but it seems fine too as a default in this cache file.

LGTM

if (NOT CMAKE_CONFIGURATION_TYPES)
set(LLVM_DISTRIBUTION_COMPONENTS
"clang;hlsl-resource-headers;clangd"
CACHE STRING "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to define a distribution components we might want clang-dxc in there as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clang symlinks are all part of the clang component, so they all get installed together. We should probably change that and have some which are part of the default target (clang, clang++), and others that aren't (like clang-dxc).

@llvm-beanz llvm-beanz merged commit 8c5e487 into llvm:main May 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category HLSL HLSL Language Support
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants