[Mlir-commits] [mlir] [MLIR][CMake] Disable PCH reuse for C API libraries (PR #182862)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Feb 23 07:00:47 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Alexis Engelke (aengelke)
<details>
<summary>Changes</summary>
C API libraries override the symbol visibility default, which is incompatible with PCH.
---
Full diff: https://github.com/llvm/llvm-project/pull/182862.diff
1 Files Affected:
- (modified) mlir/cmake/modules/AddMLIR.cmake (+3)
``````````diff
diff --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake
index be28a2ab900c9..76e6e0c1f3833 100644
--- a/mlir/cmake/modules/AddMLIR.cmake
+++ b/mlir/cmake/modules/AddMLIR.cmake
@@ -675,6 +675,9 @@ function(add_mlir_public_c_api_library name)
ENABLE_AGGREGATION
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir-c
+
+ # Disable PCH reuse due to non-default symbol visibility.
+ DISABLE_PCH_REUSE
)
# API libraries compile with hidden visibility and macros that enable
# exporting from the DLL. Only apply to the obj lib, which only affects
``````````
</details>
https://github.com/llvm/llvm-project/pull/182862
More information about the Mlir-commits
mailing list