[clang] [clang] Do not pass -canonical-system-headers on Windows by default (PR #71097)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 5 14:35:04 PST 2023
================
@@ -1180,8 +1180,19 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
if (ArgM->getOption().matches(options::OPT_M) ||
ArgM->getOption().matches(options::OPT_MD))
CmdArgs.push_back("-sys-header-deps");
+
+ // #70011: Canonicalization on Windows does unexpected things like change
+ // drive letters.
+ // FIXME: find and use Windows API that canonicalizes paths except for
+ // drive letter.
+#if defined(_WIN32) || defined(_WIN64)
----------------
MaskRay wrote:
`_WIN32` is defined on 64-bit Windows.
https://github.com/llvm/llvm-project/pull/71097
More information about the cfe-commits
mailing list