summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-03-20 02:37:25 +0000
committer Spandan Das <spandandas@google.com> 2025-03-20 02:52:26 +0000
commit670efb65fe0e535d889c5e37e91f2ae6af5d0ad5 (patch)
tree7edfbb1b71eb9df8536fd676f2ab5f9761b155f6
parentab3911674d9682b9a8ff70dcf8d1443c92009d7d (diff)
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
-rw-r--r--cmd/soong_ui/main.go4
-rw-r--r--ui/build/dumpvars.go7
2 files changed, 8 insertions, 3 deletions
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 4f6de82a2..584cc042d 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -333,7 +333,7 @@ func dumpVar(ctx build.Context, config build.Config, args []string) {
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 @@ func dumpVars(ctx build.Context, config build.Config, args []string) {
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 {
diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go
index 16a3db8e6..710be8407 100644
--- a/ui/build/dumpvars.go
+++ b/ui/build/dumpvars.go
@@ -181,7 +181,12 @@ func Banner(config Config, make_vars map[string]string) string {
fmt.Fprintf(b, "%s=%s\n", name, make_vars[name])
}
}
- fmt.Fprintf(b, "SOONG_ONLY=%t\n", config.soongOnlyRequested)
+ if config.skipKatiControlledByFlags {
+ fmt.Fprintf(b, "SOONG_ONLY=%t\n", config.soongOnlyRequested)
+ } else { // default for this product
+ fmt.Fprintf(b, "SOONG_ONLY=%t\n", make_vars["PRODUCT_SOONG_ONLY"] == "true")
+ }
+
fmt.Fprint(b, "============================================")
return b.String()