Skip to content

Commit c8ee8d0

Browse files
Install torch-mlir binaries (#421)
In addition, use add_llvm_executable so that the relative rpath of the installed binaries is set properly.
1 parent 7672849 commit c8ee8d0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tools/torch-mlir-lsp-server/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# torch-mlir-lsp-server is always linked dynamically as we want to distribute the
22
# binaries with the python packages for hacking/debugging.
3-
add_executable(torch-mlir-lsp-server torch-mlir-lsp-server.cpp)
3+
add_llvm_executable(torch-mlir-lsp-server torch-mlir-lsp-server.cpp)
4+
5+
install(TARGETS torch-mlir-lsp-server
6+
EXPORT TorchMLIRTargets
7+
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
8+
COMPONENT torch-mlir-lsp-server)
49

510
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
611
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)

tools/torch-mlir-opt/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
add_executable(torch-mlir-opt torch-mlir-opt.cpp)
1+
add_llvm_executable(torch-mlir-opt torch-mlir-opt.cpp)
2+
3+
install(TARGETS torch-mlir-opt
4+
EXPORT TorchMLIRTargets
5+
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
6+
COMPONENT torch-mlir-opt)
27

38
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
49
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)

0 commit comments

Comments
 (0)