blob: 6ad53072bee1ae58a399bd9778042db9284c2ed2 [file] [log] [blame]
Colin Cross2fe66872015-03-30 17:20:39 -07001// Copyright 2015 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package java
16
17// This file contains the module types for compiling Java for Android, and converts the properties
18// into the flags and filenames necessary to pass to the compiler. The final creation of the rules
19// is handled in builder.go
20
21import (
22 "fmt"
23 "path/filepath"
24 "strings"
25
26 "github.com/google/blueprint"
Colin Crossc0b06f12015-04-08 13:03:43 -070027 "github.com/google/blueprint/pathtools"
Colin Cross2fe66872015-03-30 17:20:39 -070028
29 "android/soong/common"
30)
31
Colin Cross2fe66872015-03-30 17:20:39 -070032// TODO:
33// Autogenerated files:
Colin Cross2fe66872015-03-30 17:20:39 -070034// Proto
35// Renderscript
36// Post-jar passes:
37// Proguard
38// Emma
39// Jarjar
40// Dex
41// Rmtypedefs
42// Jack
43// DroidDoc
44// Findbugs
45
46// javaBase contains the properties and members used by all java module types, and implements
47// the blueprint.Module interface.
48type javaBase struct {
49 common.AndroidModuleBase
50 module JavaModuleType
51
52 properties struct {
53 // srcs: list of source files used to compile the Java module. May be .java, .logtags, .proto,
54 // or .aidl files.
55 Srcs []string `android:"arch_variant,arch_subtract"`
56
Colin Cross276284f2015-04-20 13:51:48 -070057 // java_resource_dirs: list of directories containing Java resources
58 Java_resource_dirs []string `android:"arch_variant"`
Colin Cross2fe66872015-03-30 17:20:39 -070059
60 // no_standard_libraries: don't build against the default libraries (core-libart, core-junit,
61 // ext, and framework for device targets)
62 No_standard_libraries bool
63
64 // javacflags: list of module-specific flags that will be used for javac compiles
65 Javacflags []string `android:"arch_variant"`
66
67 // dxflags: list of module-specific flags that will be used for dex compiles
68 Dxflags []string `android:"arch_variant"`
69
70 // java_libs: list of of java libraries that will be in the classpath
71 Java_libs []string `android:"arch_variant"`
72
73 // java_static_libs: list of java libraries that will be compiled into the resulting jar
74 Java_static_libs []string `android:"arch_variant"`
75
76 // manifest: manifest file to be included in resulting jar
77 Manifest string
78
79 // sdk_version: if not blank, set to the version of the sdk to compile against
80 Sdk_version string
81
82 // Set for device java libraries, and for host versions of device java libraries
83 // built for testing
84 Dex bool `blueprint:"mutated"`
Colin Cross65bf4f22015-04-03 16:54:17 -070085
86 // jarjar_rules: if not blank, run jarjar using the specified rules file
87 Jarjar_rules string
Colin Crossc0b06f12015-04-08 13:03:43 -070088
89 // aidl_includes: directories to pass to aidl tool
90 Aidl_includes []string
91
92 // aidl_export_include_dirs: directories that should be added as include directories
93 // for any aidl sources of modules that depend on this module
94 Export_aidl_include_dirs []string
Colin Cross2fe66872015-03-30 17:20:39 -070095 }
96
97 // output file suitable for inserting into the classpath of another compile
98 classpathFile string
99
100 // jarSpecs suitable for inserting classes from a static library into another jar
101 classJarSpecs []jarSpec
102
103 // jarSpecs suitable for inserting resources from a static library into another jar
104 resourceJarSpecs []jarSpec
105
Colin Crossc0b06f12015-04-08 13:03:43 -0700106 exportAidlIncludeDirs []string
107
Colin Crossf05fe972015-04-10 17:45:20 -0700108 logtagsSrcs []string
109
Colin Cross2fe66872015-03-30 17:20:39 -0700110 // installed file for binary dependency
111 installFile string
112}
113
114type JavaModuleType interface {
115 GenerateJavaBuildActions(ctx common.AndroidModuleContext)
116}
117
118type JavaDependency interface {
119 ClasspathFile() string
120 ClassJarSpecs() []jarSpec
121 ResourceJarSpecs() []jarSpec
Colin Crossc0b06f12015-04-08 13:03:43 -0700122 AidlIncludeDirs() []string
Colin Cross2fe66872015-03-30 17:20:39 -0700123}
124
125func NewJavaBase(base *javaBase, module JavaModuleType, hod common.HostOrDeviceSupported,
126 props ...interface{}) (blueprint.Module, []interface{}) {
127
128 base.module = module
129
130 props = append(props, &base.properties)
131
132 return common.InitAndroidArchModule(base, hod, common.MultilibCommon, props...)
133}
134
135func (j *javaBase) BootClasspath(ctx common.AndroidBaseContext) string {
136 if ctx.Device() {
137 if j.properties.Sdk_version == "" {
138 return "core-libart"
139 } else if j.properties.Sdk_version == "current" {
140 // TODO: !TARGET_BUILD_APPS
Colin Crossc0b06f12015-04-08 13:03:43 -0700141 // TODO: export preprocessed framework.aidl from android_stubs_current
Colin Cross2fe66872015-03-30 17:20:39 -0700142 return "android_stubs_current"
143 } else if j.properties.Sdk_version == "system_current" {
144 return "android_system_stubs_current"
145 } else {
146 return "sdk_v" + j.properties.Sdk_version
147 }
148 } else {
149 if j.properties.Dex {
150 return "core-libart"
151 } else {
152 return ""
153 }
154 }
155}
156
Colin Crossefb9ebe2015-04-16 14:08:06 -0700157var defaultJavaLibraries = []string{"core-libart", "core-junit", "ext", "framework"}
158
Colin Cross2fe66872015-03-30 17:20:39 -0700159func (j *javaBase) AndroidDynamicDependencies(ctx common.AndroidDynamicDependerModuleContext) []string {
160 var deps []string
161
162 if !j.properties.No_standard_libraries {
163 bootClasspath := j.BootClasspath(ctx)
164 if bootClasspath != "" {
165 deps = append(deps, bootClasspath)
166 }
Colin Crossefb9ebe2015-04-16 14:08:06 -0700167 if ctx.Device() && j.properties.Sdk_version == "" {
168 deps = append(deps, defaultJavaLibraries...)
169 }
Colin Cross2fe66872015-03-30 17:20:39 -0700170 }
171 deps = append(deps, j.properties.Java_libs...)
172 deps = append(deps, j.properties.Java_static_libs...)
173
174 return deps
175}
176
Colin Crossc0b06f12015-04-08 13:03:43 -0700177func (j *javaBase) aidlFlags(ctx common.AndroidModuleContext, aidlPreprocess string,
Colin Crossf03c82b2015-04-13 13:53:40 -0700178 aidlIncludeDirs []string) []string {
Colin Crossc0b06f12015-04-08 13:03:43 -0700179
180 localAidlIncludes := pathtools.PrefixPaths(j.properties.Aidl_includes, common.ModuleSrcDir(ctx))
181
182 var flags []string
183 if aidlPreprocess != "" {
184 flags = append(flags, "-p"+aidlPreprocess)
185 } else {
186 flags = append(flags, common.JoinWithPrefix(aidlIncludeDirs, "-I"))
187 }
188
189 flags = append(flags, common.JoinWithPrefix(j.exportAidlIncludeDirs, "-I"))
190 flags = append(flags, common.JoinWithPrefix(localAidlIncludes, "-I"))
191 flags = append(flags, "-I"+common.ModuleSrcDir(ctx))
192 flags = append(flags, "-I"+filepath.Join(common.ModuleSrcDir(ctx), "src"))
193
Colin Crossf03c82b2015-04-13 13:53:40 -0700194 return flags
Colin Crossc0b06f12015-04-08 13:03:43 -0700195}
196
Colin Cross2fe66872015-03-30 17:20:39 -0700197func (j *javaBase) collectDeps(ctx common.AndroidModuleContext) (classpath []string,
Colin Crossc0b06f12015-04-08 13:03:43 -0700198 bootClasspath string, classJarSpecs, resourceJarSpecs []jarSpec, aidlPreprocess string,
Colin Crosse7a9f3f2015-04-13 14:02:52 -0700199 aidlIncludeDirs []string, srcFileLists []string) {
Colin Cross2fe66872015-03-30 17:20:39 -0700200
201 ctx.VisitDirectDeps(func(module blueprint.Module) {
202 otherName := ctx.OtherModuleName(module)
203 if javaDep, ok := module.(JavaDependency); ok {
Colin Cross6cbb1272015-04-08 11:23:01 -0700204 if otherName == j.BootClasspath(ctx) {
205 bootClasspath = javaDep.ClasspathFile()
206 } else if inList(otherName, j.properties.Java_libs) {
Colin Cross2fe66872015-03-30 17:20:39 -0700207 classpath = append(classpath, javaDep.ClasspathFile())
208 } else if inList(otherName, j.properties.Java_static_libs) {
209 classpath = append(classpath, javaDep.ClasspathFile())
210 classJarSpecs = append(classJarSpecs, javaDep.ClassJarSpecs()...)
211 resourceJarSpecs = append(resourceJarSpecs, javaDep.ResourceJarSpecs()...)
Colin Crosse7a9f3f2015-04-13 14:02:52 -0700212 } else if ctx.ModuleName() == "framework" && otherName == "framework-res" {
213 // framework.jar has a one-off dependency on the R.java and Manifest.java files
214 // generated by framework-res.apk
215 srcFileLists = append(srcFileLists, module.(*javaBase).module.(*AndroidApp).rJarSpec.fileList)
Colin Cross2fe66872015-03-30 17:20:39 -0700216 } else {
217 panic(fmt.Errorf("unknown dependency %q for %q", otherName, ctx.ModuleName()))
218 }
Colin Crossaa8630b2015-04-13 13:52:22 -0700219 aidlIncludeDirs = append(aidlIncludeDirs, javaDep.AidlIncludeDirs()...)
220 if sdkDep, ok := module.(sdkDependency); ok {
221 if sdkDep.AidlPreprocessed() != "" {
222 if aidlPreprocess != "" {
223 ctx.ModuleErrorf("multiple dependencies with preprocessed aidls:\n %q\n %q",
224 aidlPreprocess, sdkDep.AidlPreprocessed())
225 } else {
226 aidlPreprocess = sdkDep.AidlPreprocessed()
227 }
Colin Crossc0b06f12015-04-08 13:03:43 -0700228 }
229 }
Colin Cross2fe66872015-03-30 17:20:39 -0700230 } else {
231 ctx.ModuleErrorf("unknown dependency module type for %q", otherName)
232 }
233 })
234
Colin Crosse7a9f3f2015-04-13 14:02:52 -0700235 return classpath, bootClasspath, classJarSpecs, resourceJarSpecs, aidlPreprocess,
236 aidlIncludeDirs, srcFileLists
Colin Cross2fe66872015-03-30 17:20:39 -0700237}
238
239func (j *javaBase) GenerateAndroidBuildActions(ctx common.AndroidModuleContext) {
240 j.module.GenerateJavaBuildActions(ctx)
241}
242
243func (j *javaBase) GenerateJavaBuildActions(ctx common.AndroidModuleContext) {
Colin Crossc0b06f12015-04-08 13:03:43 -0700244
245 j.exportAidlIncludeDirs = pathtools.PrefixPaths(j.properties.Export_aidl_include_dirs,
246 common.ModuleSrcDir(ctx))
247
248 classpath, bootClasspath, classJarSpecs, resourceJarSpecs, aidlPreprocess,
Colin Crosse7a9f3f2015-04-13 14:02:52 -0700249 aidlIncludeDirs, srcFileLists := j.collectDeps(ctx)
Colin Crossc0b06f12015-04-08 13:03:43 -0700250
Colin Crossf03c82b2015-04-13 13:53:40 -0700251 var flags javaBuilderFlags
252
253 javacFlags := j.properties.Javacflags
254 if len(javacFlags) > 0 {
255 ctx.Variable(pctx, "javacFlags", strings.Join(javacFlags, " "))
256 flags.javacFlags = "$javacFlags"
257 }
258
259 aidlFlags := j.aidlFlags(ctx, aidlPreprocess, aidlIncludeDirs)
260 if len(aidlFlags) > 0 {
261 ctx.Variable(pctx, "aidlFlags", strings.Join(aidlFlags, " "))
262 flags.aidlFlags = "$aidlFlags"
Colin Cross2fe66872015-03-30 17:20:39 -0700263 }
264
265 var javacDeps []string
266
Colin Cross2fe66872015-03-30 17:20:39 -0700267 if bootClasspath != "" {
268 flags.bootClasspath = "-bootclasspath " + bootClasspath
269 javacDeps = append(javacDeps, bootClasspath)
270 }
271
272 if len(classpath) > 0 {
273 flags.classpath = "-classpath " + strings.Join(classpath, ":")
274 javacDeps = append(javacDeps, classpath...)
275 }
276
Colin Crossc0b06f12015-04-08 13:03:43 -0700277 srcFiles := common.ExpandSources(ctx, j.properties.Srcs)
278
Colin Crossf05fe972015-04-10 17:45:20 -0700279 srcFiles = j.genSources(ctx, srcFiles, flags)
Colin Crossc0b06f12015-04-08 13:03:43 -0700280
Colin Cross8cf13342015-04-10 15:41:49 -0700281 if len(srcFiles) > 0 {
282 // Compile java sources into .class files
Colin Crosse7a9f3f2015-04-13 14:02:52 -0700283 classes := TransformJavaToClasses(ctx, srcFiles, srcFileLists, flags, javacDeps)
Colin Cross8cf13342015-04-10 15:41:49 -0700284 if ctx.Failed() {
285 return
286 }
287
288 classJarSpecs = append([]jarSpec{classes}, classJarSpecs...)
Colin Cross2fe66872015-03-30 17:20:39 -0700289 }
290
Colin Cross276284f2015-04-20 13:51:48 -0700291 resourceJarSpecs = append(ResourceDirsToJarSpecs(ctx, j.properties.Java_resource_dirs),
292 resourceJarSpecs...)
Colin Cross2fe66872015-03-30 17:20:39 -0700293
294 manifest := j.properties.Manifest
295 if manifest != "" {
296 manifest = filepath.Join(common.ModuleSrcDir(ctx), manifest)
297 }
298
299 allJarSpecs := append([]jarSpec(nil), classJarSpecs...)
300 allJarSpecs = append(allJarSpecs, resourceJarSpecs...)
301
302 // Combine classes + resources into classes-full-debug.jar
303 outputFile := TransformClassesToJar(ctx, allJarSpecs, manifest)
304 if ctx.Failed() {
305 return
306 }
Colin Cross65bf4f22015-04-03 16:54:17 -0700307
Colin Cross65bf4f22015-04-03 16:54:17 -0700308 if j.properties.Jarjar_rules != "" {
309 jarjar_rules := filepath.Join(common.ModuleSrcDir(ctx), j.properties.Jarjar_rules)
310 // Transform classes-full-debug.jar into classes-jarjar.jar
311 outputFile = TransformJarJar(ctx, outputFile, jarjar_rules)
312 if ctx.Failed() {
313 return
314 }
Colin Cross20978302015-04-10 17:05:07 -0700315
316 classes, _ := TransformPrebuiltJarToClasses(ctx, outputFile)
317 classJarSpecs = []jarSpec{classes}
Colin Cross65bf4f22015-04-03 16:54:17 -0700318 }
319
Colin Cross20978302015-04-10 17:05:07 -0700320 j.resourceJarSpecs = resourceJarSpecs
321 j.classJarSpecs = classJarSpecs
Colin Cross2fe66872015-03-30 17:20:39 -0700322 j.classpathFile = outputFile
323
Colin Cross8cf13342015-04-10 15:41:49 -0700324 if j.properties.Dex && len(srcFiles) > 0 {
Colin Cross2fe66872015-03-30 17:20:39 -0700325 dxFlags := j.properties.Dxflags
326 if false /* emma enabled */ {
327 // If you instrument class files that have local variable debug information in
328 // them emma does not correctly maintain the local variable table.
329 // This will cause an error when you try to convert the class files for Android.
330 // The workaround here is to build different dex file here based on emma switch
331 // then later copy into classes.dex. When emma is on, dx is run with --no-locals
332 // option to remove local variable information
333 dxFlags = append(dxFlags, "--no-locals")
334 }
335
Colin Cross1332b002015-04-07 17:11:30 -0700336 if ctx.AConfig().Getenv("NO_OPTIMIZE_DX") != "" {
Colin Cross2fe66872015-03-30 17:20:39 -0700337 dxFlags = append(dxFlags, "--no-optimize")
338 }
339
Colin Cross1332b002015-04-07 17:11:30 -0700340 if ctx.AConfig().Getenv("GENERATE_DEX_DEBUG") != "" {
Colin Cross2fe66872015-03-30 17:20:39 -0700341 dxFlags = append(dxFlags,
342 "--debug",
343 "--verbose",
344 "--dump-to="+filepath.Join(common.ModuleOutDir(ctx), "classes.lst"),
345 "--dump-width=1000")
346 }
347
348 flags.dxFlags = strings.Join(dxFlags, " ")
349
350 // Compile classes.jar into classes.dex
Colin Cross6d1e72d2015-04-10 17:44:24 -0700351 dexJarSpec := TransformClassesJarToDex(ctx, outputFile, flags)
Colin Cross2fe66872015-03-30 17:20:39 -0700352 if ctx.Failed() {
353 return
354 }
355
356 // Combine classes.dex + resources into javalib.jar
Colin Cross6d1e72d2015-04-10 17:44:24 -0700357 outputFile = TransformDexToJavaLib(ctx, resourceJarSpecs, dexJarSpec)
Colin Cross2fe66872015-03-30 17:20:39 -0700358 }
359
360 j.installFile = ctx.InstallFileName("framework", ctx.ModuleName()+".jar", outputFile)
361}
362
363var _ JavaDependency = (*JavaLibrary)(nil)
364
365func (j *javaBase) ClasspathFile() string {
366 return j.classpathFile
367}
368
369func (j *javaBase) ClassJarSpecs() []jarSpec {
370 return j.classJarSpecs
371}
372
373func (j *javaBase) ResourceJarSpecs() []jarSpec {
374 return j.resourceJarSpecs
375}
376
Colin Crossc0b06f12015-04-08 13:03:43 -0700377func (j *javaBase) AidlIncludeDirs() []string {
378 return j.exportAidlIncludeDirs
379}
380
Colin Crossf05fe972015-04-10 17:45:20 -0700381var _ logtagsProducer = (*javaBase)(nil)
382
383func (j *javaBase) logtags() []string {
384 return j.logtagsSrcs
385}
386
Colin Cross2fe66872015-03-30 17:20:39 -0700387//
388// Java libraries (.jar file)
389//
390
391type JavaLibrary struct {
392 javaBase
393}
394
395func JavaLibraryFactory() (blueprint.Module, []interface{}) {
396 module := &JavaLibrary{}
397
398 module.properties.Dex = true
399
400 return NewJavaBase(&module.javaBase, module, common.HostAndDeviceSupported)
401}
402
403func JavaLibraryHostFactory() (blueprint.Module, []interface{}) {
404 module := &JavaLibrary{}
405
406 return NewJavaBase(&module.javaBase, module, common.HostSupported)
407}
408
409//
410// Java Binaries (.jar file plus wrapper script)
411//
412
413type JavaBinary struct {
414 JavaLibrary
415
416 binaryProperties struct {
417 // wrapper: installable script to execute the resulting jar
418 Wrapper string
419 }
420}
421
422func (j *JavaBinary) GenerateJavaBuildActions(ctx common.AndroidModuleContext) {
423 j.JavaLibrary.GenerateJavaBuildActions(ctx)
424
425 // Depend on the installed jar (j.installFile) so that the wrapper doesn't get executed by
426 // another build rule before the jar has been installed.
427 ctx.InstallFile("bin", filepath.Join(common.ModuleSrcDir(ctx), j.binaryProperties.Wrapper),
428 j.installFile)
429}
430
431func JavaBinaryFactory() (blueprint.Module, []interface{}) {
432 module := &JavaBinary{}
433
434 module.properties.Dex = true
435
436 return NewJavaBase(&module.javaBase, module, common.HostAndDeviceSupported, &module.binaryProperties)
437}
438
439func JavaBinaryHostFactory() (blueprint.Module, []interface{}) {
440 module := &JavaBinary{}
441
442 return NewJavaBase(&module.javaBase, module, common.HostSupported, &module.binaryProperties)
443}
444
445//
446// Java prebuilts
447//
448
449type JavaPrebuilt struct {
450 common.AndroidModuleBase
451
452 properties struct {
Colin Crossaa8630b2015-04-13 13:52:22 -0700453 Srcs []string
Colin Cross2fe66872015-03-30 17:20:39 -0700454 }
455
Colin Crosse1d62a82015-04-03 16:53:05 -0700456 classpathFile string
457 classJarSpecs, resourceJarSpecs []jarSpec
Colin Cross2fe66872015-03-30 17:20:39 -0700458}
459
460func (j *JavaPrebuilt) GenerateAndroidBuildActions(ctx common.AndroidModuleContext) {
461 if len(j.properties.Srcs) != 1 {
462 ctx.ModuleErrorf("expected exactly one jar in srcs")
463 return
464 }
Colin Crosse1d62a82015-04-03 16:53:05 -0700465 prebuilt := filepath.Join(common.ModuleSrcDir(ctx), j.properties.Srcs[0])
466
467 classJarSpec, resourceJarSpec := TransformPrebuiltJarToClasses(ctx, prebuilt)
468
469 j.classpathFile = prebuilt
470 j.classJarSpecs = []jarSpec{classJarSpec}
471 j.resourceJarSpecs = []jarSpec{resourceJarSpec}
Colin Crosse1d62a82015-04-03 16:53:05 -0700472 ctx.InstallFileName("framework", ctx.ModuleName()+".jar", j.classpathFile)
Colin Cross2fe66872015-03-30 17:20:39 -0700473}
474
475var _ JavaDependency = (*JavaPrebuilt)(nil)
476
477func (j *JavaPrebuilt) ClasspathFile() string {
478 return j.classpathFile
479}
480
481func (j *JavaPrebuilt) ClassJarSpecs() []jarSpec {
Colin Crosse1d62a82015-04-03 16:53:05 -0700482 return j.classJarSpecs
Colin Cross2fe66872015-03-30 17:20:39 -0700483}
484
485func (j *JavaPrebuilt) ResourceJarSpecs() []jarSpec {
Colin Crosse1d62a82015-04-03 16:53:05 -0700486 return j.resourceJarSpecs
Colin Cross2fe66872015-03-30 17:20:39 -0700487}
488
Colin Crossc0b06f12015-04-08 13:03:43 -0700489func (j *JavaPrebuilt) AidlIncludeDirs() []string {
490 return nil
491}
492
Colin Cross2fe66872015-03-30 17:20:39 -0700493func JavaPrebuiltFactory() (blueprint.Module, []interface{}) {
494 module := &JavaPrebuilt{}
495
496 return common.InitAndroidArchModule(module, common.HostAndDeviceSupported,
497 common.MultilibCommon, &module.properties)
498}
499
Colin Crossaa8630b2015-04-13 13:52:22 -0700500//
501// SDK java prebuilts (.jar containing resources plus framework.aidl)
502//
503
504type sdkDependency interface {
505 JavaDependency
506 AidlPreprocessed() string
507}
508
509var _ sdkDependency = (*sdkPrebuilt)(nil)
510
511type sdkPrebuilt struct {
512 JavaPrebuilt
513
514 sdkProperties struct {
515 Aidl_preprocessed string
516 }
517
518 aidlPreprocessed string
519}
520
521func (j *sdkPrebuilt) GenerateAndroidBuildActions(ctx common.AndroidModuleContext) {
522 j.JavaPrebuilt.GenerateAndroidBuildActions(ctx)
523
524 if j.sdkProperties.Aidl_preprocessed != "" {
525 j.aidlPreprocessed = filepath.Join(common.ModuleSrcDir(ctx), j.sdkProperties.Aidl_preprocessed)
526 }
527}
528
529func (j *sdkPrebuilt) AidlPreprocessed() string {
530 return j.aidlPreprocessed
531}
532
533func SdkPrebuiltFactory() (blueprint.Module, []interface{}) {
534 module := &sdkPrebuilt{}
535
536 return common.InitAndroidArchModule(module, common.HostAndDeviceSupported,
537 common.MultilibCommon, &module.properties, &module.sdkProperties)
538}
539
Colin Cross2fe66872015-03-30 17:20:39 -0700540func inList(s string, l []string) bool {
541 for _, e := range l {
542 if e == s {
543 return true
544 }
545 }
546 return false
547}