[Mlir-commits] [mlir] [mlir][cmake] Fix MLIR shared library installation (PR #152195)
Christopher Bate
llvmlistbot at llvm.org
Wed Aug 6 06:24:00 PDT 2025
================
@@ -388,6 +388,9 @@ function(add_mlir_library name)
if(TARGET ${name})
target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
+ if(ARG_INSTALL_WITH_TOOLCHAIN)
+ set_target_properties(${name} PROPERTIES MLIR_INSTALL_WITH_TOOLCHAIN TRUE)
----------------
christopherbate wrote:
This might be a minor point, but is the purpose of the property is to allow separating the call to "add_mlir_library_install"? Seems like it would be more efficient to pass via arguments. We're incurring another set/lookup of property for all targets.
I think the use case of the separation was just to allow invoking the install helper on targets not declared via "add_mlir_library" (but would need to double check). If that's the case, we should just hoist the check up out of the install helper to this point.
https://github.com/llvm/llvm-project/pull/152195
More information about the Mlir-commits
mailing list