Skip to content

Commit e9a12bb

Browse files
committed
Try to fix link error
1 parent d492166 commit e9a12bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlir/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ set(MLIR_INSTALL_AGGREGATE_OBJECTS 1 CACHE BOOL
157157

158158
set(MLIR_BUILD_MLIR_C_DYLIB 0 CACHE BOOL "Builds libMLIR-C shared library.")
159159

160-
# AMD: Disabled, causes options to be registered multiple times
161-
set(MLIR_LINK_MLIR_DYLIB OFF CACHE BOOL
160+
set(MLIR_LINK_MLIR_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL
162161
"Link tools against libMLIR.so")
163162

164163
configure_file(

mlir/cmake/modules/AddMLIR.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,8 @@ function(mlir_target_link_libraries target type)
732732
endif()
733733

734734
if (MLIR_LINK_MLIR_DYLIB)
735-
target_link_libraries(${target} ${type} MLIR)
735+
# AMD: Do not link shared, as this casues linking errors
736+
target_link_libraries(${target} ${type} ${ARGN})
736737
else()
737738
target_link_libraries(${target} ${type} ${ARGN})
738739
endif()

0 commit comments

Comments
 (0)