This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Avoid minimizing PCH input files
ClosedPublic

Authored by jansvoboda11 on Jun 18 2021, 7:33 AM.

Details

Summary

This patch avoid minimizing input files that contributed to a PCH or its modules. This prevents the implicit modular build to fail on unexpected file size. Depends on D106146.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Jun 18 2021, 7:33 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2021, 7:33 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Handle system input files.

I run a quick benchmark where an empty TU is configured with an explicitly built PCH that imports Cocoa. Dependency scanning without minimization takes 226 ms, with this patch 303 ms and 325 ms when padding minimized files to the original size. Since we'll eventually switch to a more sound implementation, I'm fine with this in the meantime.

Entirely disable DepFS when scanning PCHs.

jansvoboda11 edited the summary of this revision. (Show Details)
jansvoboda11 set the repository for this revision to rG LLVM Github Monorepo.

Rebase on top of D106064, solving Windows CI failure.

jansvoboda11 retitled this revision from WIP: [clang][deps] Avoid minimizing PCH input files to [clang][deps] Avoid minimizing PCH input files.Jul 15 2021, 9:52 AM
This revision is now accepted and ready to land.Jul 16 2021, 12:27 PM
This revision was landed with ongoing or failed builds.Jul 20 2021, 3:20 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Jul 20 2021, 4:18 AM

Looks like this breaks tests on Windows: http://45.33.8.238/win/42264/step_7.txt

Please take a look, and revert for now if it takes a while to fix.

Looks like this breaks tests on Windows: http://45.33.8.238/win/42264/step_7.txt

Please take a look, and revert for now if it takes a while to fix.

Thanks, that was a bad rebase. Should be fixed in c94a345a5c693b6c12a41e8f50e3fe96d1311991.