Add the ability to select on arch
Bug: 323382414
Test: go test
Change-Id: I0d4cf391a1a625c5160456db1f4f7fa424c2141e
diff --git a/android/arch_module_context.go b/android/arch_module_context.go
index 3cf4b41..a3a03af 100644
--- a/android/arch_module_context.go
+++ b/android/arch_module_context.go
@@ -35,6 +35,7 @@
type archModuleContext struct {
// TODO: these should eventually go through a (possibly cached) provider like any other configuration instead
// of being special cased.
+ ready bool
os OsType
target Target
targetPrimary bool
@@ -42,6 +43,13 @@
primaryArch bool
}
+// ArchReady returns true if the arch mutator has run on the module. Before this returns
+// true, the module essentially doesn't have an arch and cannot make decisions based on
+// architecture.
+func (a *archModuleContext) ArchReady() bool {
+ return a.ready
+}
+
func (a *archModuleContext) Target() Target {
return a.target
}