[clang] [clang] Store the Input PCH Path Using Absolute Paths in a PCH (PR #178781)
Qiongsi Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 30 10:43:29 PST 2026
================
@@ -0,0 +1,19 @@
+// Tests that when PCHs are chained, the dependent PCHs produced are identical
+// whether the input PCH is specified through a relative path or an absolute path.
+
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+// RUN: cd %t
+// RUN: %clang_cc1 -triple x86_64-apple-macos11 -emit-pch h1.h -o %t/h1.h.pch
+// RUN: %clang_cc1 -triple x86_64-apple-macos11 -emit-pch bridging.h \
+// RUN: -o %t/bridging1.h.pch -include-pch %t/h1.h.pch
+// RUN: %clang_cc1 -triple x86_64-apple-macos11 -emit-pch bridging.h \
+// RUN: -o %t/bridging2.h.pch -include-pch ./h1.h.pch
----------------
qiongsiwu wrote:
Do we mean we want to compile `bridging2.h.pch` in a different directory?
> it encodes the working directory from the first compilation.
Do we mean when we compile `bridging2.h.pch`, we use the working directory from the compilation of `h1.h`?
https://github.com/llvm/llvm-project/pull/178781
More information about the cfe-commits
mailing list