Page MenuHomePhabricator

[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.Thu, Jul 15, 9:52 AM
This revision is now accepted and ready to land.Fri, Jul 16, 12:27 PM
This revision was landed with ongoing or failed builds.Tue, Jul 20, 3:20 AM
This revision was automatically updated to reflect the committed changes.

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.