[Mlir-commits] [mlir] [mlir] Fix MLIR dylib CMake config when LLVM_BUILD_LLVM_DYLIB is OFF (PR #155488)
Christopher Bate
llvmlistbot at llvm.org
Thu Aug 28 17:02:26 PDT 2025
================
@@ -172,8 +172,11 @@ set(MLIR_INSTALL_AGGREGATE_OBJECTS 1 CACHE BOOL
set(MLIR_BUILD_MLIR_C_DYLIB 0 CACHE BOOL "Builds libMLIR-C shared library.")
-set(MLIR_LINK_MLIR_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL
- "Link tools against libMLIR.so")
+set(MLIR_BUILD_MLIR_DYLIB 0 CACHE BOOL "Builds the libMLIR shared library")
----------------
christopherbate wrote:
Nit: It looks like we're propagating an ancient CMake style for declaring boolean cache variables. CMake provides a separate shorthand command that is more readable:
```
option(MLIR_BUILD_MLIR_DYLIB "Builds the libMLIR shared library" OFF)
```
https://github.com/llvm/llvm-project/pull/155488
More information about the Mlir-commits
mailing list