bp2build: add support for soong_config_module_type.

Test: CI, go unit test
Bug: 198556411
Change-Id: Idf862904d51d822f92af0c072341c31b7a02fc64
This commit is contained in:
Jingwen Chen
2021-11-02 16:43:57 +00:00
parent 925942127a
commit a47f28d28e
16 changed files with 710 additions and 96 deletions

View File

@@ -464,6 +464,11 @@ func runBp2Build(configuration android.Config, extraNinjaDeps []string) {
// conversion for Bazel conversion.
bp2buildCtx := android.NewContext(configuration)
// Soong internals like LoadHooks behave differently when running as
// bp2build. This is the bit to differentiate between Soong-as-Soong and
// Soong-as-bp2build.
bp2buildCtx.SetRunningAsBp2build()
// Propagate "allow misssing dependencies" bit. This is normally set in
// newContext(), but we create bp2buildCtx without calling that method.
bp2buildCtx.SetAllowMissingDependencies(configuration.AllowMissingDependencies())