[llvm] [CMake] Enable new policy for CMAKE_MSVC_DEBUG_INFORMATION_FORMAT (PR #82371)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 03:39:56 PDT 2024


================
@@ -10,3 +10,16 @@ endif()
 if(POLICY CMP0116)
   cmake_policy(SET CMP0116 OLD)
 endif()
+
+# MSVC debug information format flags are selected via
+# CMAKE_MSVC_DEBUG_INFORMATION_FORMAT, instead of
+# embedding flags in e.g. CMAKE_CXX_FLAGS_RELEASE.
+# New in CMake 3.25.
+#
+# Supports debug info with SCCache
+# (https://github.com/mozilla/sccache?tab=readme-ov-file#usage)
+# avoiding “fatal error C1041: cannot open program database; if
+# multiple CL.EXE write to the same .PDB file, please use /FS"
++if(POLICY CMP0141)
----------------
mstorsjo wrote:

Actually, here, an extra `+` char had slipped in at the start of each line, breaking every single buildbot we have. But I pushed a fix in 1b945e35a6a59fda436585f8fca12c82a27fc6a9.

https://github.com/llvm/llvm-project/pull/82371


More information about the llvm-commits mailing list