Skip to content

Commit dc1056a

Browse files
Revert "[MLIR] Move from using target_link_libraries to LINK_LIBS for llvm libraries."
This reverts commit 2f265e3.
1 parent fed2acc commit dc1056a

File tree

59 files changed

+220
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+220
-427
lines changed

mlir/examples/toy/Ch6/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,4 @@ target_link_libraries(toyc-ch6
4141
MLIRPass
4242
MLIRTargetLLVMIR
4343
MLIRTransforms
44-
LLVMOrcJIT
45-
LLVMSupport
46-
LLVMX86CodeGen
47-
LLVMX86Desc
48-
LLVMX86Info
4944
)

mlir/examples/toy/Ch7/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ target_link_libraries(toyc-ch7
3838
MLIRIR
3939
MLIRParser
4040
MLIRPass
41-
MLIRSupport
4241
MLIRTargetLLVMIR
4342
MLIRTransforms
44-
LLVMOrcJIT
45-
LLVMSupport
46-
LLVMX86CodeGen
47-
LLVMX86Desc
48-
LLVMX86Info
4943
)

mlir/lib/Analysis/CMakeLists.txt

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ add_llvm_library(MLIRAnalysis
2222

2323
ADDITIONAL_HEADER_DIRS
2424
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
25-
26-
LINK_LIBS
27-
MLIRAffineOps
28-
MLIRIR
29-
MLIRLoopOps
30-
MLIRSupport
31-
LLVMSupport
3225
)
3326
add_dependencies(MLIRAnalysis
3427
MLIRAffineOps
@@ -37,6 +30,8 @@ add_dependencies(MLIRAnalysis
3730
MLIRLoopOps
3831
)
3932

33+
target_link_libraries(MLIRAnalysis MLIRAffineOps MLIRLoopOps)
34+
4035
add_llvm_library(MLIRLoopAnalysis
4136
AffineAnalysis.cpp
4237
AffineStructures.cpp
@@ -46,18 +41,12 @@ add_llvm_library(MLIRLoopAnalysis
4641

4742
ADDITIONAL_HEADER_DIRS
4843
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
49-
50-
LINK_LIBS
51-
MLIRAffineOps
52-
MLIRIR
53-
MLIRLoopOps
54-
MLIRStandardOps
55-
MLIRSupport
56-
LLVMSupport
5744
)
5845
add_dependencies(MLIRLoopAnalysis
5946
MLIRAffineOps
6047
MLIRCallOpInterfacesIncGen
6148
MLIRTypeInferOpInterfaceIncGen
6249
MLIRLoopOps
6350
)
51+
52+
target_link_libraries(MLIRLoopAnalysis MLIRAffineOps MLIRLoopOps)

mlir/lib/Conversion/AffineToStandard/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@ add_mlir_conversion_library(MLIRAffineToStandard
33

44
ADDITIONAL_HEADER_DIRS
55
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/AffineToStandard
6+
)
7+
add_dependencies(
8+
MLIRAffineToStandard
69

7-
LINK_LIBS
810
MLIRAffineOps
9-
MLIRLoopOps
10-
MLIRPass
1111
MLIRStandardOps
12-
MLIRTransforms
1312
MLIRIR
1413
LLVMCore
1514
LLVMSupport
16-
)
17-
add_dependencies(
15+
)
16+
target_link_libraries(
1817
MLIRAffineToStandard
1918

2019
MLIRAffineOps
20+
MLIRLoopOps
21+
MLIRPass
2122
MLIRStandardOps
23+
MLIRTransforms
2224
MLIRIR
2325
LLVMCore
2426
LLVMSupport

mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,11 @@ if (MLIR_CUDA_CONVERSIONS_ENABLED)
1010
list(APPEND SOURCES "ConvertKernelFuncToCubin.cpp")
1111
endif()
1212

13-
add_mlir_conversion_library(MLIRGPUtoCUDATransforms
14-
${SOURCES}
15-
LINK_LIBS
16-
LLVMNVPTXCodeGen
17-
LLVMNVPTXDesc
18-
LLVMNVPTXInfo
13+
add_mlir_conversion_library(MLIRGPUtoCUDATransforms ${SOURCES})
14+
target_link_libraries(MLIRGPUtoCUDATransforms
1915
MLIRGPU
2016
MLIRLLVMIR
2117
MLIRNVVMIR
2218
MLIRPass
2319
MLIRTargetNVVMIR
24-
)
20+
)

mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,17 @@ add_public_tablegen_target(MLIRGPUToNVVMIncGen)
44

55
add_mlir_conversion_library(MLIRGPUtoNVVMTransforms
66
LowerGpuOpsToNVVMOps.cpp
7+
)
8+
9+
add_dependencies(MLIRGPUtoNVVMTransforms
10+
MLIRGPUToNVVMIncGen)
711

8-
LINK_LIBS
9-
LLVMCore
12+
target_link_libraries(MLIRGPUtoNVVMTransforms
1013
LLVMSupport
1114
MLIRGPU
12-
MLIRIR
1315
MLIRLLVMIR
1416
MLIRNVVMIR
1517
MLIRPass
16-
MLIRStandardOps
1718
MLIRStandardToLLVM
18-
MLIRSupport
19-
MLIRTransforms
2019
MLIRTransformUtils
2120
)
22-
23-
add_dependencies(MLIRGPUtoNVVMTransforms
24-
MLIRGPUToNVVMIncGen)
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
add_mlir_conversion_library(MLIRGPUtoROCDLTransforms
22
LowerGpuOpsToROCDLOps.cpp
3-
4-
LINK_LIBS
5-
LLVMCore
3+
)
4+
target_link_libraries(MLIRGPUtoROCDLTransforms
65
LLVMSupport
76
MLIRGPU
8-
MLIRIR
97
MLIRLLVMIR
108
MLIRROCDLIR
119
MLIRPass
1210
MLIRStandardToLLVM
13-
MLIRStandardOps
14-
MLIRTransforms
15-
MLIRTransformUtils
1611
)

mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ add_public_tablegen_target(MLIRGPUToSPIRVIncGen)
55
add_mlir_conversion_library(MLIRGPUtoSPIRVTransforms
66
ConvertGPUToSPIRV.cpp
77
ConvertGPUToSPIRVPass.cpp
8+
)
9+
10+
add_dependencies(MLIRGPUtoSPIRVTransforms
11+
MLIRGPUToSPIRVIncGen)
812

9-
LINK_LIBS
13+
target_link_libraries(MLIRGPUtoSPIRVTransforms
1014
MLIRGPU
1115
MLIRIR
12-
MLIRLoopOps
1316
MLIRPass
1417
MLIRSPIRV
1518
MLIRStandardOps
1619
MLIRStandardToSPIRVTransforms
1720
MLIRSupport
1821
MLIRTransforms
19-
LLVMSupport
2022
)
21-
22-
add_dependencies(MLIRGPUtoSPIRVTransforms
23-
MLIRGPUToSPIRVIncGen)

mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ add_mlir_conversion_library(MLIRLinalgToLLVM
33

44
ADDITIONAL_HEADER_DIRS
55
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LinalgToLLVM
6-
7-
LINK_LIBS
6+
)
7+
set(LIBS
88
MLIRAffineToStandard
99
MLIREDSC
1010
MLIRIR
1111
MLIRLinalgOps
1212
MLIRLLVMIR
1313
MLIRLoopToStandard
14-
MLIRPass
15-
MLIRStandardOps
1614
MLIRStandardToLLVM
1715
MLIRVectorToLLVM
1816
MLIRTransforms
1917
LLVMCore
2018
LLVMSupport
2119
)
20+
21+
add_dependencies(MLIRLinalgToLLVM ${LIBS})
22+
target_link_libraries(MLIRLinalgToLLVM ${LIBS})

mlir/lib/Conversion/LinalgToSPIRV/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ add_mlir_conversion_library(MLIRLinalgToSPIRVTransforms
55
ADDITIONAL_HEADER_DIRS
66
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
77
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
8+
)
89

9-
LINK_LIBS
10+
target_link_libraries(MLIRLinalgToSPIRVTransforms
1011
MLIRIR
1112
MLIRLinalgOps
1213
MLIRLinalgUtils
1314
MLIRPass
1415
MLIRSPIRV
1516
MLIRSupport
16-
MLIRTransforms
17-
MLIRTransformUtils
18-
LLVMSupport
1917
)

mlir/lib/Conversion/LoopToStandard/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ add_mlir_conversion_library(MLIRLoopToStandard
33

44
ADDITIONAL_HEADER_DIRS
55
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopToStandard
6+
)
7+
add_dependencies(
8+
MLIRLoopToStandard
69

7-
LINK_LIBS
8-
MLIRIR
910
MLIRLoopOps
10-
MLIRPass
11-
MLIRStandardOps
1211
MLIRTransforms
1312
LLVMCore
1413
LLVMSupport
15-
)
16-
add_dependencies(
14+
)
15+
target_link_libraries(
1716
MLIRLoopToStandard
1817

1918
MLIRLoopOps

mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ set(LIBS
44
MLIRGPU
55
MLIRIR
66
MLIRLinalgOps
7-
MLIRLoopOps
87
MLIRPass
98
MLIRStandardOps
109
MLIRSupport
1110
MLIRTransforms
12-
MLIRTransformUtils
1311
LLVMSupport
1412
)
1513

@@ -19,8 +17,6 @@ add_mlir_conversion_library(MLIRLoopsToGPU
1917

2018
ADDITIONAL_HEADER_DIRS
2119
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU
22-
23-
LINK_LIBS
24-
${LIBS}
25-
)
20+
)
2621
add_dependencies(MLIRLoopsToGPU ${LIBS})
22+
target_link_libraries(MLIRLoopsToGPU ${LIBS})

mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ add_mlir_conversion_library(MLIRStandardToLLVM
33

44
ADDITIONAL_HEADER_DIRS
55
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/StandardToLLVM
6+
)
7+
add_dependencies(
8+
MLIRStandardToLLVM
69

7-
LINK_LIBS
8-
MLIRIR
910
MLIRLLVMIR
10-
MLIRPass
11-
MLIRStandardOps
1211
MLIRTransforms
1312
LLVMCore
1413
LLVMSupport
15-
)
16-
add_dependencies(
14+
)
15+
target_link_libraries(
1716
MLIRStandardToLLVM
1817

1918
MLIRLLVMIR

mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ add_mlir_conversion_library(MLIRStandardToSPIRVTransforms
1010
ADDITIONAL_HEADER_DIRS
1111
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
1212
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
13+
)
14+
15+
add_dependencies(MLIRStandardToSPIRVTransforms
16+
MLIRStandardToSPIRVIncGen)
1317

14-
LINK_LIBS
18+
target_link_libraries(MLIRStandardToSPIRVTransforms
1519
MLIRIR
1620
MLIRPass
1721
MLIRSPIRV
1822
MLIRSupport
19-
MLIRTransforms
2023
MLIRTransformUtils
2124
MLIRSPIRV
2225
MLIRStandardOps
23-
LLVMSupport
2426
)
25-
26-
add_dependencies(MLIRStandardToSPIRVTransforms
27-
MLIRStandardToSPIRVIncGen)

mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ add_mlir_conversion_library(MLIRVectorToLLVM
33

44
ADDITIONAL_HEADER_DIRS
55
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLLVM
6-
7-
LINK_LIBS
8-
MLIRIR
6+
)
7+
set(LIBS
98
MLIRLLVMIR
10-
MLIRPass
11-
MLIRStandardOps
129
MLIRStandardToLLVM
1310
MLIRVectorOps
1411
MLIRTransforms
15-
MLIRTransformUtils
1612
LLVMCore
1713
LLVMSupport
18-
)
14+
)
15+
16+
add_dependencies(MLIRVectorToLLVM ${LIBS})
17+
target_link_libraries(MLIRVectorToLLVM ${LIBS})

mlir/lib/Conversion/VectorToLoops/CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@ add_mlir_conversion_library(MLIRVectorToLoops
33

44
ADDITIONAL_HEADER_DIRS
55
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLoops
6-
7-
LINK_LIBS
8-
MLIRAffineOps
6+
)
7+
set(LIBS
98
MLIREDSC
10-
MLIRIR
119
MLIRLLVMIR
12-
MLIRLoopOps
13-
MLIRStandardOps
1410
MLIRTransforms
15-
MLIRTransformUtils
16-
MLIRVectorOps
1711
LLVMCore
1812
LLVMSupport
1913
)
14+
15+
add_dependencies(MLIRVectorToLoops ${LIBS})
16+
target_link_libraries(MLIRVectorToLoops ${LIBS})

mlir/lib/Dialect/AffineOps/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ add_mlir_dialect_library(MLIRAffineOps
55

66
ADDITIONAL_HEADER_DIRS
77
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AffineOps
8+
)
9+
add_dependencies(MLIRAffineOps
810

9-
LINK_LIBS
11+
MLIRAffineOpsIncGen
1012
MLIREDSC
1113
MLIRIR
14+
MLIRLoopLikeInterfaceIncGen
1215
MLIRStandardOps
13-
LLVMSupport
1416
)
15-
add_dependencies(MLIRAffineOps
17+
target_link_libraries(MLIRAffineOps
1618

17-
MLIRAffineOpsIncGen
1819
MLIREDSC
1920
MLIRIR
20-
MLIRLoopLikeInterfaceIncGen
2121
MLIRStandardOps
2222
)

0 commit comments

Comments
 (0)