Skip to content

Commit cdee446

Browse files
authored
[Build] cleanup build dependency (#5432)
Add LLVMHLSL dependency to LLVMIPO and LLVMScalarOpts. Remove passprinters from LLVMHLSL to avoid cycle. This is to fix link error found when trying to enable clang_cc1.
1 parent 5d796bf commit cdee446

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/DxrFallback/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
set(LLVM_LINK_COMPONENTS
2+
passprinters
3+
)
4+
15
add_llvm_library(LLVMDxrFallback
26
DxrFallbackCompiler.cpp
37
FunctionBuilder.h

lib/HLSL/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Copyright (C) Microsoft Corporation. All rights reserved.
22
# This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details.
3-
set(LLVM_LINK_COMPONENTS
4-
${LLVM_TARGETS_TO_BUILD}
5-
passprinters
6-
)
73

84
add_hlsl_hctgen(DxcOptimizer OUTPUT DxcOptimizer.inc BUILD_DIR)
95
add_hlsl_hctgen(DxilValidation OUTPUT DxilValidationImpl.inc BUILD_DIR)

lib/Transforms/IPO/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ add_llvm_library(LLVMipo
3030

3131
add_dependencies(LLVMipo intrinsics_gen)
3232

33-
target_link_libraries(LLVMipo PUBLIC LLVMDXIL) # HLSL Change
33+
target_link_libraries(LLVMipo PUBLIC LLVMDXIL LLVMHLSL) # HLSL Change

lib/Transforms/Scalar/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ add_llvm_library(LLVMScalarOpts
6868

6969
add_dependencies(LLVMScalarOpts intrinsics_gen)
7070

71-
target_link_libraries(LLVMScalarOpts PUBLIC LLVMDXIL) # HLSL Change
71+
target_link_libraries(LLVMScalarOpts PUBLIC LLVMDXIL LLVMHLSL) # HLSL Change

tools/clang/tools/dxcompiler/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ set(LLVM_LINK_COMPONENTS
4343
transformutils
4444
vectorize
4545
dxilcompression
46+
passprinters
4647
)
4748

4849
if (WIN32)

0 commit comments

Comments
 (0)