Add the ability to select on arch
Bug: 323382414 Test: go test Change-Id: I0d4cf391a1a625c5160456db1f4f7fa424c2141e
This commit is contained in:
@@ -599,7 +599,14 @@ func (m *baseModuleContext) EvaluateConfiguration(ty parser.SelectType, conditio
|
||||
}
|
||||
return "", false
|
||||
case parser.SelectTypeVariant:
|
||||
m.ModuleErrorf("TODO(b/323382414): Variants are not yet supported in selects")
|
||||
if condition == "arch" {
|
||||
if !m.ArchReady() {
|
||||
m.ModuleErrorf("A select on arch was attempted before the arch mutator ran")
|
||||
return "", false
|
||||
}
|
||||
return m.Arch().ArchType.Name, true
|
||||
}
|
||||
m.ModuleErrorf("Unknown variant " + condition)
|
||||
return "", false
|
||||
default:
|
||||
panic("Should be unreachable")
|
||||
|
Reference in New Issue
Block a user