diff options
author | 2024-03-14 14:33:02 -0700 | |
---|---|---|
committer | 2024-03-14 15:24:09 -0700 | |
commit | bdd8aeeb58d08630fad0e70df69cd4afa22e45cd (patch) | |
tree | 8447a02ac7aeaa97d2c960797e000cec28a274b9 /android/module_context.go | |
parent | ed9005b55672ce511ee9458d10e90a5c984cdd70 (diff) |
Make select statements work on path properties
Fixes: 329711542
Test: go test
Change-Id: I71f489c26c535174e226e4a9ab449cc2b4bee83a
Diffstat (limited to 'android/module_context.go')
-rw-r--r-- | android/module_context.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/android/module_context.go b/android/module_context.go index 3fc5d0158..1cab63022 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -21,7 +21,6 @@ import ( "strings" "github.com/google/blueprint" - "github.com/google/blueprint/parser" "github.com/google/blueprint/proptools" ) @@ -213,10 +212,6 @@ type ModuleContext interface { // GenerateAndroidBuildActions. If it is called then the struct will be written out and included in // the module-info.json generated by Make, and Make will not generate its own data for this module. ModuleInfoJSON() *ModuleInfoJSON - - // EvaluateConfiguration makes ModuleContext a valid proptools.ConfigurableEvaluator, so this context - // can be used to evaluate the final value of Configurable properties. - EvaluateConfiguration(parser.SelectType, string) (string, bool) } type moduleContext struct { @@ -719,32 +714,3 @@ func (m *moduleContext) HostRequiredModuleNames() []string { func (m *moduleContext) TargetRequiredModuleNames() []string { return m.module.TargetRequiredModuleNames() } - -func (m *moduleContext) EvaluateConfiguration(ty parser.SelectType, condition string) (string, bool) { - switch ty { - case parser.SelectTypeReleaseVariable: - if v, ok := m.Config().productVariables.BuildFlags[condition]; ok { - return v, true - } - return "", false - case parser.SelectTypeProductVariable: - // TODO: Might add these on a case-by-case basis - m.ModuleErrorf("TODO(b/323382414): Product variables are not yet supported in selects") - return "", false - case parser.SelectTypeSoongConfigVariable: - parts := strings.Split(condition, ":") - namespace := parts[0] - variable := parts[1] - if n, ok := m.Config().productVariables.VendorVars[namespace]; ok { - if v, ok := n[variable]; ok { - return v, true - } - } - return "", false - case parser.SelectTypeVariant: - m.ModuleErrorf("TODO(b/323382414): Variants are not yet supported in selects") - return "", false - default: - panic("Should be unreachable") - } -} |