diff options
author | 2025-03-20 02:56:55 -0700 | |
---|---|---|
committer | 2025-03-20 02:56:55 -0700 | |
commit | 49700ed6bb32f43d8f20b47cdc8057ced23aafed (patch) | |
tree | d1555ed86cd119c5261d06e6c4367a3f7a2b9daf /cc | |
parent | 7a67b6bc0109c58a4f79069a77d998c9a8ee0744 (diff) | |
parent | 25f32d0a1efc79e2f1b67d56232a38305f7fa083 (diff) |
Merge "Make the fdo_profile configurable" into main am: 25f32d0a1e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3550628
Change-Id: I620d2e65f923cc06bb8ad29c5e4b8d42c32cf886
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'cc')
-rw-r--r-- | cc/fdo_profile.go | 9 |
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, }) |