aboutsummaryrefslogtreecommitdiffstats
path: root/android/arch.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/arch.go')
-rw-r--r--android/arch.go23
1 files changed, 19 insertions, 4 deletions
diff --git a/android/arch.go b/android/arch.go
index 348b0649..5887744e 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -22,9 +22,12 @@ import (
"strconv"
"strings"
+ "github.com/google/blueprint"
"github.com/google/blueprint/proptools"
)
+const COMMON_VARIANT = "common"
+
var (
archTypeList []ArchType
@@ -36,7 +39,7 @@ var (
X86_64 = newArch("x86_64", "lib64")
Common = ArchType{
- Name: "common",
+ Name: COMMON_VARIANT,
}
)
@@ -702,11 +705,23 @@ type Target struct {
}
func (target Target) String() string {
- variant := ""
+ return target.ArchVariation()
+}
+
+func (target Target) ArchVariation() string {
+ var variation string
if target.NativeBridge {
- variant = "native_bridge_"
+ variation = "native_bridge_"
+ }
+ variation += target.Arch.String()
+
+ return target.Os.String() + "_" + variation
+}
+
+func (target Target) Variations() []blueprint.Variation {
+ return []blueprint.Variation{
+ {Mutator: "arch", Variation: target.ArchVariation()},
}
- return target.Os.String() + "_" + variant + target.Arch.String()
}
// archMutator splits a module into a variant for each Target requested by the module. Target selection