Let repo mode builds create/use a unit cache
commitecb3858a5acac3fca62f677241fb2d7d4f1810ed
authorMark Williams <mwilliams@fb.com>
Thu, 18 Apr 2019 13:46:27 +0000 (18 06:46 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 18 Apr 2019 13:50:29 +0000 (18 06:50 -0700)
tree9a564a685cf398df184fe2051659e05aa943a66d
parent9664ed997ce2884f1c1583ab7a039c4a69e26132
Let repo mode builds create/use a unit cache

Summary:
If you specify a read-only local repo, `hhvm --hphp` will try to read
units from that repo, and skip parsing it if its there.

If you specify a read-write local repo, `hhvm --hphp` will
additionally write any newly parsed units back to the local repo. This
is a relatively slow process, so to avoid slowing down the build when
the cache is relatively empty, we normally just stop writing units
when parsing finishes.

Finally, if you specify --target=cache, the behavior is the same,
except hhvm will allow all the units to be written to the cache, and
won't run hhbbc, or write an optimized repo.

Reviewed By: ricklavoie

Differential Revision: D14987918

fbshipit-source-id: 2be9c4be1c57aea3ca612275d1d5cbc95a864798
hphp/compiler/analysis/analysis_result.cpp
hphp/compiler/compiler.cpp
hphp/compiler/package.cpp
hphp/compiler/package.h