[Mlir-commits] [mlir] 3de9828 - [MLIR][CMake] Disable PCH reuse for C API libraries (#182862)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 23 20:16:13 PST 2026


Author: Alexis Engelke
Date: 2026-02-23T20:16:08-08:00
New Revision: 3de98281d48ad3e00c823eb6426bf2fec9e74cf6

URL: https://github.com/llvm/llvm-project/commit/3de98281d48ad3e00c823eb6426bf2fec9e74cf6
DIFF: https://github.com/llvm/llvm-project/commit/3de98281d48ad3e00c823eb6426bf2fec9e74cf6.diff

LOG: [MLIR][CMake] Disable PCH reuse for C API libraries (#182862)

C API libraries override the symbol visibility default, which is incompatible with PCH.

Added: 
    

Modified: 
    mlir/cmake/modules/AddMLIR.cmake

Removed: 
    


################################################################################
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


        


More information about the Mlir-commits mailing list