File tree Expand file tree Collapse file tree 9 files changed +57
-24
lines changed
include/mlir/Dialect/Shape/IR Expand file tree Collapse file tree 9 files changed +57
-24
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ include_directories( ${MLIR_INCLUDE_DIR})
55
55
add_subdirectory (include /mlir )
56
56
add_subdirectory (lib )
57
57
add_subdirectory (tools )
58
- add_subdirectory (unittests )
58
+ if ( LLVM_INCLUDE_TESTS )
59
+ add_subdirectory (unittests )
60
+ endif ()
59
61
add_subdirectory (test )
60
62
61
63
if ( LLVM_INCLUDE_EXAMPLES )
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ namespace shape {
24
24
class ShapeDialect : public Dialect {
25
25
public:
26
26
// / Create the dialect in the given `context`.
27
- explicit ShapeDialect (MLIRContext *context);
27
+ explicit ShapeDialect (MLIRContext *context)
28
+ : Dialect(" shape" , context) {}
28
29
};
29
30
30
31
namespace ShapeTypes {
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ add_llvm_library(MLIRShape
5
5
ADDITIONAL_HEADER_DIRS
6
6
${MLIR_MAIN_INCLUDE_DIR} /mlir/Dialect/Shape
7
7
)
8
- add_dependencies (MLIRShape MLIRShapeOpsIncGen LLVMSupport )
9
- target_link_libraries (MLIRShape LLVMSupport )
8
+ add_dependencies (MLIRShape MLIRIR MLIRShapeOpsIncGen LLVMSupport )
9
+ target_link_libraries (MLIRShape MLIRIR LLVMSupport )
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ add_llvm_library(MLIRJitRunner
42
42
JitRunner.cpp
43
43
)
44
44
target_link_libraries (MLIRJitRunner PRIVATE
45
+ MLIRAllDialects
45
46
MLIRExecutionEngine
46
47
MLIRIR
47
48
MLIRParser
Original file line number Diff line number Diff line change @@ -61,12 +61,14 @@ if(MLIR_CUDA_RUNNER_ENABLED)
61
61
)
62
62
endif ()
63
63
64
- add_lit_testsuite (check-mlir "Running the MLIR regression tests"
65
- ${CMAKE_CURRENT_BINARY_DIR}
66
- DEPENDS ${MLIR_TEST_DEPENDS}
64
+ if (LLVM_BUILD_TESTS )
65
+ add_lit_testsuite (check-mlir "Running the MLIR regression tests"
66
+ ${CMAKE_CURRENT_BINARY_DIR}
67
+ DEPENDS ${MLIR_TEST_DEPENDS}
67
68
)
68
- set_target_properties (check-mlir PROPERTIES FOLDER "Tests" )
69
+ set_target_properties (check-mlir PROPERTIES FOLDER "Tests" )
69
70
70
- add_lit_testsuites (MLIR ${CMAKE_CURRENT_SOURCE_DIR}
71
- DEPENDS ${MLIR_TEST_DEPS}
72
- )
71
+ add_lit_testsuites (MLIR ${CMAKE_CURRENT_SOURCE_DIR}
72
+ DEPENDS ${MLIR_TEST_DEPS}
73
+ )
74
+ endif ()
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ target_link_libraries(mlir-edsc-builder-api-test
21
21
22
22
target_include_directories (mlir-edsc-builder-api-test PRIVATE .. )
23
23
24
- whole_archive_link (mlir-edsc-builder-api-test
25
- MLIRAffineOps
26
- MLIRLinalgOps
27
- MLIRLoopOps
28
- MLIRStandardOps
29
- MLIRVectorOps
30
- MLIRTransforms
31
- )
24
+ if ( NOT BUILD_SHARED_LIBS )
25
+ whole_archive_link (mlir-edsc-builder-api-test
26
+ MLIRAffineOps
27
+ MLIRLinalgOps
28
+ MLIRLoopOps
29
+ MLIRStandardOps
30
+ MLIRVectorOps
31
+ MLIRTransforms
32
+ )
33
+ endif ()
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ target_link_libraries(mlir-sdbm-api-test
14
14
15
15
target_include_directories (mlir-sdbm-api-test PRIVATE .. )
16
16
17
- whole_archive_link (mlir-sdbm-api-test
18
- MLIRSDBM
19
- )
17
+ if ( NOT BUILD_SHARED_LIBS )
18
+ whole_archive_link (mlir-sdbm-api-test
19
+ MLIRSDBM
20
+ )
21
+ endif ()
Original file line number Diff line number Diff line change @@ -4,11 +4,32 @@ set(LLVM_OPTIONAL_SOURCES
4
4
5
5
set (LIB_LIBS
6
6
MLIRAnalysis
7
- MLIRLLVMIR
7
+ MLIRAllDialects
8
+ MLIRAffineToStandard
9
+ MLIRGPUtoCUDATransforms
10
+ MLIRGPUtoNVVMTransforms
11
+ MLIRGPUtoROCDLTransforms
12
+ MLIRGPUtoSPIRVTransforms
13
+ MLIRGPUtoVulkanTransforms
14
+ MLIRLinalgTransforms
15
+ MLIRLinalgToLLVM
16
+ MLIRLinalgToSPIRVTransforms
17
+ MLIRLoopsToGPU
18
+ MLIRLoopToStandard
19
+ MLIRStandardToLLVM
20
+ MLIRStandardToSPIRVTransforms
21
+ MLIRSPIRVTransforms
22
+ MLIRSPIRVTestPasses
23
+ MLIRVectorToLLVM
24
+ MLIRVectorToLoops
8
25
MLIROptLib
9
26
MLIRParser
10
27
MLIRPass
11
28
MLIRTransforms
29
+ MLIRTestIR
30
+ MLIRTestPass
31
+ MLIRTestTransforms
32
+ MLIRQuantizerTransforms
12
33
MLIRSupport
13
34
)
14
35
add_llvm_library (MLIRMlirOptMain
Original file line number Diff line number Diff line change @@ -20,5 +20,7 @@ add_llvm_tool(mlir-translate
20
20
mlir-translate.cpp
21
21
)
22
22
llvm_update_compile_flags (mlir-translate )
23
- whole_archive_link (mlir-translate ${FULL_LIBS} )
23
+ if ( NOT BUILD_SHARED_LIBS )
24
+ whole_archive_link (mlir-translate ${FULL_LIBS} )
25
+ endif ()
24
26
target_link_libraries (mlir-translate PRIVATE MLIRIR MLIRTranslateClParser ${LIBS} LLVMSupport )
You can’t perform that action at this time.
0 commit comments