summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
author Yi Kong <yikong@google.com> 2025-03-19 15:20:37 +0900
committer Yi Kong <yikong@google.com> 2025-03-19 20:15:39 -0700
commite2ec01ccf8d82a2f8c1b41da959d3b5d3af95f1e (patch)
tree00ad92038dcab44cdf1b3fdd41ed9ebaf1a0e2ae /cc
parent92d29690f16cdbba244b523c9110cb9af999d22e (diff)
Make the fdo_profile configurable
Test: m nothing Bug: 404481956 Bug: 404706675 Change-Id: I424a0b26bf9b348e9b9c48027be78f5d445f1764
Diffstat (limited to 'cc')
-rw-r--r--cc/fdo_profile.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/fdo_profile.go b/cc/fdo_profile.go
index 1a3395773..c79ea1018 100644
--- a/cc/fdo_profile.go
+++ b/cc/fdo_profile.go
@@ -17,6 +17,8 @@ package cc
import (
"android/soong/android"
"github.com/google/blueprint"
+
+ "github.com/google/blueprint/proptools"
)
func init() {
@@ -34,7 +36,7 @@ type fdoProfile struct {
}
type fdoProfileProperties struct {
- Profile *string `android:"arch_variant"`
+ Profile proptools.Configurable[string] `android:"arch_variant,replace_instead_of_append"`
}
// FdoProfileInfo is provided by FdoProfileProvider
@@ -47,8 +49,9 @@ var FdoProfileProvider = blueprint.NewProvider[FdoProfileInfo]()
// GenerateAndroidBuildActions of fdo_profile does not have any build actions
func (fp *fdoProfile) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- if fp.properties.Profile != nil {
- path := android.PathForModuleSrc(ctx, *fp.properties.Profile)
+ profile := fp.properties.Profile.GetOrDefault(ctx, "")
+ if profile != "" {
+ path := android.PathForModuleSrc(ctx, profile)
android.SetProvider(ctx, FdoProfileProvider, FdoProfileInfo{
Path: path,
})