Add support for preferred arch symlinks
Add a symlink_preferred_arch property to binaries to allow compiling the
binary for multiple architectures and then creating a symlink to the
preferred archicture, for example dalvikvm32 and dalvikvm64, with
dalvikvm symlinked to dalvikvm64.
Test: mmma -j art/dalvikvm
Change-Id: Ied15f2be9d52c01006fe8ac207c175b78558eab1
diff --git a/android/module.go b/android/module.go
index fd37ca8..45afec1 100644
--- a/android/module.go
+++ b/android/module.go
@@ -63,6 +63,7 @@
Device() bool
Darwin() bool
Debug() bool
+ PrimaryArch() bool
AConfig() Config
DeviceConfig() DeviceConfig
}
@@ -548,6 +549,10 @@
return a.debug
}
+func (a *androidBaseContextImpl) PrimaryArch() bool {
+ return a.target.Arch.ArchType == a.config.Targets[a.target.Os.Class][0].Arch.ArchType
+}
+
func (a *androidBaseContextImpl) AConfig() Config {
return a.config
}