Add opt-in option to turn on ThinLTO caching
Allow developers to enable ThinLTO caching on their local build by setting USE_THINLTO_CACHE environment variable. This significantly speeds up incremental ThinLTO builds by caching intermediate results. An incremental ART build (by `touch compiler/compiler.cc`) reduced from 01:32 to 00:45. We put the cache under out/soong/thinlto-cache as the cache can be valid across different targets, and allows us to set a global cache pruning policy. The current cache policy is sufficient for current list of ThinLTO-enabled projects, we can tune it up/down in the future. Test: USE_THINLTO_CACHE=true m Bug: 62839002 Change-Id: I4838fe833a1d8fbc73d743da6d19e3698dc89600
Loading
Please register or sign in to comment