diff options
author | Colin Cross <ccross@android.com> | 2015-03-30 17:20:39 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-04-03 16:24:44 -0700 |
commit | 2fe6687847a137c6897b19afefa187a38a2a8b6e (patch) | |
tree | d710173c69915e0f8a1d22712b746e9f839a2c6c /common/arch.go | |
parent | 35cec12a11e1b279960f463f53a74b5407de056a (diff) | |
download | build_soong-2fe6687847a137c6897b19afefa187a38a2a8b6e.tar.gz build_soong-2fe6687847a137c6897b19afefa187a38a2a8b6e.tar.bz2 build_soong-2fe6687847a137c6897b19afefa187a38a2a8b6e.zip |
Support java libraries, binaries, and prebuilts
Add support for compiling java libraries (.jar files with
or without .dex), java binaries (.jar files with a wrapper
script to run them), and java prebuilts (for the SDK .jars)
Change-Id: Id624da64c92cf20c6d9577c6bb06e5b212af0d1b
Diffstat (limited to 'common/arch.go')
-rw-r--r-- | common/arch.go | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/common/arch.go b/common/arch.go index 1758c0db..d4c17cf0 100644 --- a/common/arch.go +++ b/common/arch.go @@ -31,6 +31,10 @@ var ( Mips64 = newArch64("Mips64") X86 = newArch32("X86") X86_64 = newArch64("X86_64") + + Common = ArchType{ + Name: "common", + } ) /* @@ -254,6 +258,14 @@ var ( HostOrDevice: Host, ArchType: X86_64, } + commonDevice = Arch{ + HostOrDevice: Device, + ArchType: Common, + } + commonHost = Arch{ + HostOrDevice: Host, + ArchType: Common, + } ) func ArchMutator(mctx blueprint.EarlyMutatorContext) { @@ -269,11 +281,18 @@ func ArchMutator(mctx blueprint.EarlyMutatorContext) { arches := []Arch{} if module.base().HostSupported() { - arches = append(arches, host64Arch) + switch module.base().commonProperties.Compile_multilib { + case "common": + arches = append(arches, commonHost) + default: + arches = append(arches, host64Arch) + } } if module.base().DeviceSupported() { switch module.base().commonProperties.Compile_multilib { + case "common": + arches = append(arches, commonDevice) case "both": arches = append(arches, arm64Arch, armArch) case "first", "64": @@ -345,6 +364,10 @@ func InitArchModule(m AndroidModule, defaultMultilib Multilib, // Rewrite the module's properties structs to contain arch-specific values. func (a *AndroidModuleBase) setArchProperties(ctx blueprint.EarlyMutatorContext, arch Arch) { + if arch.ArchType == Common { + return + } + for i := range a.generalProperties { generalPropsValue := reflect.ValueOf(a.generalProperties[i]).Elem() |