diff options
author | Greg Estren <gregce@google.com> | 2016-06-20 21:24:42 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-06-21 09:58:45 +0000 |
commit | 81a89997be258d6978ead96608c240aee9ec95ea (patch) | |
tree | e536729cec9cb71d5d93ecc1caef202c1ff95303 /src/tools/android/java/com/google/devtools/build/android/resources | |
parent | aedfc8aec2d086a3400bb9773f59f5d5e3cbfc67 (diff) |
Updates BuildViewTestCase.invalidatePackages() to also invalidate
configurations.
This is important for dynamic configurations.
invalidatePackages() invalidates every file. This includes CROSSTOOL,
which the CppConfiguration fragment depends on.
For static configurations, this doesn't matter because all configurations
and their fragments are pre-computed at the beginning of the build (or
in the case of tests before the test case starts).
For dynamic configurations, the configuration can get custom-created
each configured target. When that happens after invalidatePackages,
a new CppConfiguration instance gets created. This can impact code
like CcLibraryHelper.addDeps(), which assumes equality (CppConfiguration
has no .equals() method).
Normally that's not a problem because the same CppConfiguration instance
is used for every target in the post-invalidatePackages() graph. But
host configurations break this: we keep a non-Skyframe host config cache
in SkyframeBuildView.hostConfigurationCache. Without this change, it
doesn't get cleared out, so it keeps old pre-invalidation references that
under certain circumstances get applied to post-invalidation targets.
--
MOS_MIGRATED_REVID=125379342
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/resources')
0 files changed, 0 insertions, 0 deletions