Print the default SOONG_ONLY value of the product in lunch output
SOONG_ONLY=false is currently printed as the output of lunch even for
enabled products such as `aosp_cf_x86_64_phone`.
config.soongOnlyRequested evaluates to true during the main build (it
invokes `runMakeProductConfig), but is currently always false when used
in report_config.
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug # SOONG_ONLY=true (previously
false)
Test: lunch cf_x86_64_phone-trunk_staging-userdebug # SOONG_ONLY=false
Bug: 402519768
Change-Id: If859695a583c6627af05fb62eb0f8b3fa93aeec8
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 4f6de82..584cc04 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -333,7 +333,7 @@
varName := flags.Arg(0)
if varName == "report_config" {
- varData, err := build.DumpMakeVars(ctx, config, nil, build.BannerVars)
+ varData, err := build.DumpMakeVars(ctx, config, nil, append(build.BannerVars, "PRODUCT_SOONG_ONLY"))
if err != nil {
ctx.Fatal(err)
}
@@ -400,7 +400,7 @@
if i := indexList("report_config", allVars); i != -1 {
allVars = append(allVars[:i], allVars[i+1:]...)
- allVars = append(allVars, build.BannerVars...)
+ allVars = append(allVars, append(build.BannerVars, "PRODUCT_SOONG_ONLY")...)
}
if len(allVars) == 0 {