Skip to content

Commit 1ef8d5c

Browse files
authored
Merge pull request #74350 from gottesmm/pr-14492224ffefe9f5bf2798bb31c30bcce232d650
[docs] Add a little section about Disabling PCH Verification.
2 parents 910d717 + 045c214 commit 1ef8d5c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/DebuggingTheCompiler.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ benefit of all Swift developers.
3636
- [Bisecting on SIL optimizer pass counts to identify optimizer bugs](#bisecting-on-sil-optimizer-pass-counts-to-identify-optimizer-bugs)
3737
- [Using git-bisect in the presence of branch forwarding/feature branches](#using-git-bisect-in-the-presence-of-branch-forwardingfeature-branches)
3838
- [Reducing SIL test cases using bug_reducer](#reducing-sil-test-cases-using-bug_reducer)
39+
- [Disabling PCH Verification](#disabling-pch-verification)
3940
- [Debugging the Compiler Build](#debugging-the-compiler-build)
4041
- [Build Dry Run](#build-dry-run)
4142
- [Debugging the Compiler Driver](#debugging-the-compiler-driver-build)
@@ -832,6 +833,19 @@ each time you change shas. To do this you can pass `--match-timestamp`
832833
to automatically checkout match the timestamp of the `apple/swift` repo
833834
across the other repos.
834835

836+
## Disabling PCH Verification
837+
838+
Sometimes one needs to try to compile against PCH modules where the PCH version
839+
verification checking is too strict. To work around this, one can disable the
840+
checking by passing in to swift:
841+
842+
```sh
843+
-Xcc -Xclang -Xcc -fno-validate-pch
844+
```
845+
846+
NOTE: If there are actual differences in between the on disk PCH format and the
847+
format expected by the compiler crashes and undefined behavior may result.
848+
835849
# Debugging the Compiler Build
836850

837851
## Build Dry Run

0 commit comments

Comments
 (0)