summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2022-11-04 13:35:50 +0000
committer Paul Duffin <paulduffin@google.com> 2022-11-08 10:42:55 +0000
commitb4e8d91d7204d6d9025438f86fc959f0ed581864 (patch)
tree0bad9d7ed07a097c19efafe1abf94333427cb3e9 /java/java.go
parent39eae8fb90c46ba6615c6216a93674a64610bddd (diff)
Stop creating unnecessary Context objects
Previously, the Context object created in the main() method was initialized (ctx.Register()) for the main soong build. Build modes that did not want that build modes that did not want that (symlink, bp2build, apiBp2build) had to create their own context, or in the case of runSymlinkForestCreation its own EventHandler. That was very confusing. This change avoids that by simply pushing the call to ctx.Register() into the build modes that require it and that allows the other build modes to use the main context and its EventHandler. One point to note is that to ensure the exact same initialization as before the runApiBp2build has to explicitly call the following: ctx.SetAllowMissingDependencies(false) That is because the main context could have that set to true. Bug: 257650737 Test: m nothing Change-Id: Iee239fb87edf443fed65156fa14b8a30c89a2328
Diffstat (limited to 'java/java.go')
0 files changed, 0 insertions, 0 deletions