Merge "Select supports product_variable("debuggable")" into main am: 93a7a6dfe4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3093679 Change-Id: I310662a25241f2d6fb74c6a231bfd51fd0b75449 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2161,9 +2161,19 @@ func (e configurationEvalutor) EvaluateConfiguration(condition proptools.Configu
|
||||
}
|
||||
return proptools.ConfigurableValueUndefined()
|
||||
case "product_variable":
|
||||
// TODO(b/323382414): Might add these on a case-by-case basis
|
||||
ctx.OtherModulePropertyErrorf(m, property, "TODO(b/323382414): Product variables are not yet supported in selects")
|
||||
return proptools.ConfigurableValueUndefined()
|
||||
if condition.NumArgs() != 1 {
|
||||
ctx.OtherModulePropertyErrorf(m, property, "product_variable requires 1 argument, found %d", condition.NumArgs())
|
||||
return proptools.ConfigurableValueUndefined()
|
||||
}
|
||||
variable := condition.Arg(0)
|
||||
switch variable {
|
||||
case "debuggable":
|
||||
return proptools.ConfigurableValueBool(ctx.Config().Debuggable())
|
||||
default:
|
||||
// TODO(b/323382414): Might add these on a case-by-case basis
|
||||
ctx.OtherModulePropertyErrorf(m, property, fmt.Sprintf("TODO(b/323382414): Product variable %q is not yet supported in selects", variable))
|
||||
return proptools.ConfigurableValueUndefined()
|
||||
}
|
||||
case "soong_config_variable":
|
||||
if condition.NumArgs() != 2 {
|
||||
ctx.OtherModulePropertyErrorf(m, property, "soong_config_variable requires 2 arguments, found %d", condition.NumArgs())
|
||||
|
Reference in New Issue
Block a user