================
@@ -106,7 +106,14 @@ macro(add_clang_library name)
endif()
set_property(GLOBAL APPEND PROPERTY CLANG_STATIC_LIBS ${name})
endif()
- llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
+ # CLANG_BUILD_STATIC is added after llvm_add_library, but it changes the
+ # expansion of CLANG_ABI visibility macros, causing a PCH mismatch with
+ # libraries that were built without it. Disable PCH reuse in that case.
+ set(clang_pch_reuse)
+ if((WIN32 AND NOT MINGW) AND NOT CLANG_LINK_CLANG_DYLIB)
+ set(clang_pch_reuse DISABLE_PCH_REUSE)
+ endif()
----------------
aengelke wrote:
So this effectively disables PCH for Clang on Windows?
https://github.com/llvm/llvm-project/pull/191552
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits