Skip to content

Commit 9f979d7

Browse files
[MLIR] Fixes for BUILD_SHARED_LIBS=on
Differential Revision: https://reviews.llvm.org/D75308
1 parent 7c64f6b commit 9f979d7

File tree

13 files changed

+40
-6
lines changed

13 files changed

+40
-6
lines changed

mlir/examples/toy/Ch5/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ target_link_libraries(toyc-ch5
3535
MLIRIR
3636
MLIRParser
3737
MLIRPass
38+
MLIRSupport
3839
MLIRTransforms)

mlir/examples/toy/Ch6/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ target_link_libraries(toyc-ch6
4141
MLIRLLVMIR
4242
MLIRParser
4343
MLIRPass
44+
MLIRSupport
4445
MLIRTargetLLVMIR
4546
MLIRTransforms
4647
)

mlir/lib/Analysis/CMakeLists.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@ set(LLVM_OPTIONAL_SOURCES
1313
Verifier.cpp
1414
)
1515

16+
add_mlir_library(MLIRControlFlowAnalysis
17+
ControlFlowInterfaces.cpp
18+
19+
ADDITIONAL_HEADER_DIRS
20+
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
21+
22+
DEPENDS
23+
MLIRControlFlowInterfacesIncGen
24+
)
25+
target_link_libraries(MLIRControlFlowAnalysis
26+
PUBLIC
27+
MLIRIR
28+
)
29+
1630
add_mlir_library(MLIRAnalysis
1731
CallGraph.cpp
18-
ControlFlowInterfaces.cpp
1932
InferTypeOpInterface.cpp
2033
Liveness.cpp
2134
SliceAnalysis.cpp
@@ -27,7 +40,6 @@ add_mlir_library(MLIRAnalysis
2740

2841
DEPENDS
2942
MLIRCallOpInterfacesIncGen
30-
MLIRControlFlowInterfacesIncGen
3143
MLIRTypeInferOpInterfaceIncGen
3244
)
3345

@@ -49,7 +61,6 @@ add_mlir_library(MLIRLoopAnalysis
4961

5062
DEPENDS
5163
MLIRCallOpInterfacesIncGen
52-
MLIRControlFlowInterfacesIncGen
5364
MLIRTypeInferOpInterfaceIncGen
5465
)
5566

mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ endif()
1313
add_mlir_conversion_library(MLIRGPUtoCUDATransforms ${SOURCES})
1414
target_link_libraries(MLIRGPUtoCUDATransforms
1515
PUBLIC
16+
LLVMNVPTXCodeGen
17+
LLVMNVPTXDesc
18+
LLVMNVPTXInfo
19+
LLVMCore
20+
LLVMMC
21+
LLVMSupport
1622
MLIRGPU
23+
MLIRIR
1724
MLIRLLVMIR
1825
MLIRNVVMIR
1926
MLIRPass
27+
MLIRSupport
2028
MLIRTargetNVVMIR
2129
)

mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ target_link_libraries(MLIRGPUtoVulkanTransforms
1414
MLIRSupport
1515
MLIRTransforms
1616
MLIRTranslation
17+
LLVMSupport
1718
)

mlir/lib/Dialect/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ add_subdirectory(LoopOps)
77
add_subdirectory(OpenMP)
88
add_subdirectory(QuantOps)
99
add_subdirectory(SDBM)
10-
add_subdirectory(Shape)
10+
#add_subdirectory(Shape)
1111
add_subdirectory(SPIRV)
1212
add_subdirectory(StandardOps)
1313
add_subdirectory(VectorOps)

mlir/lib/Dialect/LLVMIR/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ target_link_libraries(MLIRLLVMIR
1515
LLVMCore
1616
LLVMSupport
1717
LLVMFrontendOpenMP
18+
MLIRAnalysis
1819
MLIROpenMP
1920
MLIRIR
2021
MLIRSupport

mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ add_mlir_dialect_library(MLIRLoopOpsTransforms
66
ADDITIONAL_HEADER_DIRS
77
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LoopOps
88
)
9-
109
target_link_libraries(MLIRLoopOpsTransforms
1110
PUBLIC
11+
MLIRAffineOps
12+
MLIRIR
1213
MLIRPass
1314
MLIRLoopOps
15+
MLIRStandardOps
16+
MLIRSupport
17+
LLVMSupport
1418
)

mlir/lib/Dialect/StandardOps/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ add_mlir_dialect_library(MLIRStandardOps
1313
)
1414
target_link_libraries(MLIRStandardOps
1515
PUBLIC
16+
MLIRControlFlowAnalysis
1617
MLIREDSC
1718
MLIRIR
1819
LLVMSupport

mlir/lib/Dialect/VectorOps/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ add_mlir_dialect_library(MLIRVectorOps
1313
)
1414
target_link_libraries(MLIRVectorOps
1515
PUBLIC
16+
MLIREDSC
1617
MLIRIR
1718
MLIRStandardOps
1819
MLIRAffineOps

mlir/test/SDBM/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ target_link_libraries(mlir-sdbm-api-test
88
PRIVATE
99
MLIRIR
1010
MLIRSDBM
11+
MLIRSupport
1112
LLVMCore
1213
LLVMSupport
1314
)

mlir/test/lib/TestDialect/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ target_link_libraries(MLIRTestDialect
2727
MLIRIR
2828
MLIRLinalgTransforms
2929
MLIRPass
30+
MLIRStandardOps
3031
MLIRTransforms
3132
MLIRTransformUtils
3233
LLVMSupport

mlir/tools/mlir-cpu-runner/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ target_link_libraries(mlir-cpu-runner PRIVATE
1616
MLIRSupport
1717
LLVMCore
1818
LLVMSupport
19-
)
19+
LLVMX86CodeGen
20+
LLVMX86Desc
21+
LLVMX86Info
22+
)

0 commit comments

Comments
 (0)