blob: 461aa961cc4b2c387a18fcbed3bbdeb2586d8868 [file] [log] [blame]
Dan Albert914449f2016-06-17 16:45:24 -07001// Copyright 2016 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 cc
16
17import (
Dan Albert269fab82017-02-15 17:31:33 -080018 "fmt"
Dan Albert914449f2016-06-17 16:45:24 -070019 "path/filepath"
20
21 "github.com/google/blueprint"
Spandan Dasa7da3f02023-09-28 19:30:51 +000022 "github.com/google/blueprint/proptools"
Dan Albert914449f2016-06-17 16:45:24 -070023
24 "android/soong/android"
Spandan Das319711b2023-09-19 19:04:41 +000025 "android/soong/bazel"
Dan Albert914449f2016-06-17 16:45:24 -070026)
27
Dan Albert269fab82017-02-15 17:31:33 -080028var (
Dan Albert97f9c962018-05-24 15:02:16 -070029 versionBionicHeaders = pctx.AndroidStaticRule("versionBionicHeaders",
Dan Albert269fab82017-02-15 17:31:33 -080030 blueprint.RuleParams{
Dan Albertd2130a92017-03-29 18:33:28 -070031 // The `&& touch $out` isn't really necessary, but Blueprint won't
32 // let us have only implicit outputs.
33 Command: "$versionerCmd -o $outDir $srcDir $depsPath && touch $out",
Dan Albert269fab82017-02-15 17:31:33 -080034 CommandDeps: []string{"$versionerCmd"},
Dan Albert269fab82017-02-15 17:31:33 -080035 },
Dan Albertd2130a92017-03-29 18:33:28 -070036 "depsPath", "srcDir", "outDir")
Dan Albertcb1b4b22018-05-24 15:06:11 -070037
38 preprocessNdkHeader = pctx.AndroidStaticRule("preprocessNdkHeader",
39 blueprint.RuleParams{
40 Command: "$preprocessor -o $out $in",
41 CommandDeps: []string{"$preprocessor"},
42 },
43 "preprocessor")
Dan Albert269fab82017-02-15 17:31:33 -080044)
45
46func init() {
Logan Chien2f066352018-10-25 18:11:09 +080047 pctx.SourcePathVariable("versionerCmd", "prebuilts/clang-tools/${config.HostPrebuiltTag}/bin/versioner")
Dan Albert269fab82017-02-15 17:31:33 -080048}
49
Dan Albert914449f2016-06-17 16:45:24 -070050// Returns the NDK base include path for use with sdk_version current. Usable with -I.
Colin Cross70dda7e2019-10-01 22:05:35 -070051func getCurrentIncludePath(ctx android.ModuleContext) android.InstallPath {
Dan Albert914449f2016-06-17 16:45:24 -070052 return getNdkSysrootBase(ctx).Join(ctx, "usr/include")
53}
54
Dan Albert71222052018-05-24 15:00:05 -070055type headerProperties struct {
Dan Albert914449f2016-06-17 16:45:24 -070056 // Base directory of the headers being installed. As an example:
57 //
58 // ndk_headers {
59 // name: "foo",
60 // from: "include",
61 // to: "",
62 // srcs: ["include/foo/bar/baz.h"],
63 // }
64 //
65 // Will install $SYSROOT/usr/include/foo/bar/baz.h. If `from` were instead
66 // "include/foo", it would have installed $SYSROOT/usr/include/bar/baz.h.
Nan Zhang0007d812017-11-07 10:57:05 -080067 From *string
Dan Albert914449f2016-06-17 16:45:24 -070068
69 // Install path within the sysroot. This is relative to usr/include.
Nan Zhang0007d812017-11-07 10:57:05 -080070 To *string
Dan Albert914449f2016-06-17 16:45:24 -070071
72 // List of headers to install. Glob compatible. Common case is "include/**/*.h".
Colin Cross27b922f2019-03-04 22:35:41 -080073 Srcs []string `android:"path"`
Dan Albertc6345fb2016-10-20 01:36:11 -070074
Dan Albert19ff8b42018-05-24 15:00:48 -070075 // Source paths that should be excluded from the srcs glob.
Colin Cross27b922f2019-03-04 22:35:41 -080076 Exclude_srcs []string `android:"path"`
Dan Albert19ff8b42018-05-24 15:00:48 -070077
Dan Albertc6345fb2016-10-20 01:36:11 -070078 // Path to the NOTICE file associated with the headers.
Colin Cross27b922f2019-03-04 22:35:41 -080079 License *string `android:"path"`
Dan Albert914449f2016-06-17 16:45:24 -070080}
81
82type headerModule struct {
83 android.ModuleBase
Spandan Das319711b2023-09-19 19:04:41 +000084 android.BazelModuleBase
Dan Albert914449f2016-06-17 16:45:24 -070085
Dan Albert71222052018-05-24 15:00:05 -070086 properties headerProperties
Dan Albert914449f2016-06-17 16:45:24 -070087
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +000088 srcPaths android.Paths
Colin Cross0875c522017-11-28 17:34:01 -080089 installPaths android.Paths
Colin Cross07e51612019-03-05 12:46:40 -080090 licensePath android.Path
Dan Albert914449f2016-06-17 16:45:24 -070091}
92
Dan Albert269fab82017-02-15 17:31:33 -080093func getHeaderInstallDir(ctx android.ModuleContext, header android.Path, from string,
Colin Cross70dda7e2019-10-01 22:05:35 -070094 to string) android.InstallPath {
Dan Albert269fab82017-02-15 17:31:33 -080095 // Output path is the sysroot base + "usr/include" + to directory + directory component
96 // of the file without the leading from directory stripped.
97 //
98 // Given:
99 // sysroot base = "ndk/sysroot"
100 // from = "include/foo"
101 // to = "bar"
102 // header = "include/foo/woodly/doodly.h"
103 // output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
104
105 // full/platform/path/to/include/foo
106 fullFromPath := android.PathForModuleSrc(ctx, from)
107
108 // full/platform/path/to/include/foo/woodly
109 headerDir := filepath.Dir(header.String())
110
111 // woodly
112 strippedHeaderDir, err := filepath.Rel(fullFromPath.String(), headerDir)
113 if err != nil {
114 ctx.ModuleErrorf("filepath.Rel(%q, %q) failed: %s", headerDir,
115 fullFromPath.String(), err)
116 }
117
118 // full/platform/path/to/sysroot/usr/include/bar/woodly
119 installDir := getCurrentIncludePath(ctx).Join(ctx, to, strippedHeaderDir)
120
121 // full/platform/path/to/sysroot/usr/include/bar/woodly/doodly.h
122 return installDir
123}
124
Dan Albert914449f2016-06-17 16:45:24 -0700125func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
Nan Zhang0007d812017-11-07 10:57:05 -0800126 if String(m.properties.License) == "" {
Dan Albertc6345fb2016-10-20 01:36:11 -0700127 ctx.PropertyErrorf("license", "field is required")
128 }
129
Nan Zhang0007d812017-11-07 10:57:05 -0800130 m.licensePath = android.PathForModuleSrc(ctx, String(m.properties.License))
Dan Albertc6345fb2016-10-20 01:36:11 -0700131
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000132 m.srcPaths = android.PathsForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs)
133 for _, header := range m.srcPaths {
Nan Zhang0007d812017-11-07 10:57:05 -0800134 installDir := getHeaderInstallDir(ctx, header, String(m.properties.From),
135 String(m.properties.To))
Colin Cross5c517922017-08-31 12:29:17 -0700136 installedPath := ctx.InstallFile(installDir, header.Base(), header)
Dan Albert269fab82017-02-15 17:31:33 -0800137 installPath := installDir.Join(ctx, header.Base())
138 if installPath != installedPath {
139 panic(fmt.Sprintf(
140 "expected header install path (%q) not equal to actual install path %q",
141 installPath, installedPath))
Dan Albert914449f2016-06-17 16:45:24 -0700142 }
Colin Cross0875c522017-11-28 17:34:01 -0800143 m.installPaths = append(m.installPaths, installPath)
Dan Albert914449f2016-06-17 16:45:24 -0700144 }
145
146 if len(m.installPaths) == 0 {
147 ctx.ModuleErrorf("srcs %q matched zero files", m.properties.Srcs)
148 }
149}
150
Spandan Das319711b2023-09-19 19:04:41 +0000151type bazelNdkHeadersAttributes struct {
152 Strip_import_prefix *string
153 Import_prefix *string
154 Hdrs bazel.LabelListAttribute
Spandan Dasa7da3f02023-09-28 19:30:51 +0000155 Run_versioner *bool
Spandan Das319711b2023-09-19 19:04:41 +0000156}
157
158func (h *headerModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
159 props := bazel.BazelTargetModuleProperties{
160 Rule_class: "ndk_headers",
161 Bzl_load_location: "//build/bazel/rules/cc:ndk_headers.bzl",
162 }
163 attrs := &bazelNdkHeadersAttributes{
164 Strip_import_prefix: h.properties.From,
165 Import_prefix: h.properties.To,
166 Hdrs: bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrcExcludes(ctx, h.properties.Srcs, h.properties.Exclude_srcs)),
167 }
168 ctx.CreateBazelTargetModule(
169 props,
170 android.CommonAttributes{Name: h.Name()},
171 attrs,
172 )
173}
174
Patrice Arruda6ea42112019-04-03 08:43:30 -0700175// ndk_headers installs the sets of ndk headers defined in the srcs property
176// to the sysroot base + "usr/include" + to directory + directory component.
177// ndk_headers requires the license file to be specified. Example:
178//
Colin Crossd079e0b2022-08-16 10:27:33 -0700179// Given:
180// sysroot base = "ndk/sysroot"
181// from = "include/foo"
182// to = "bar"
183// header = "include/foo/woodly/doodly.h"
184// output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
Spandan Das319711b2023-09-19 19:04:41 +0000185func NdkHeadersFactory() android.Module {
Dan Albert914449f2016-06-17 16:45:24 -0700186 module := &headerModule{}
Colin Cross36242852017-06-23 15:06:31 -0700187 module.AddProperties(&module.properties)
188 android.InitAndroidModule(module)
Spandan Das319711b2023-09-19 19:04:41 +0000189 android.InitBazelModule(module)
Colin Cross36242852017-06-23 15:06:31 -0700190 return module
Dan Albert914449f2016-06-17 16:45:24 -0700191}
Dan Albert269fab82017-02-15 17:31:33 -0800192
Dan Albert97f9c962018-05-24 15:02:16 -0700193type versionedHeaderProperties struct {
Dan Albert269fab82017-02-15 17:31:33 -0800194 // Base directory of the headers being installed. As an example:
195 //
Dan Albert97f9c962018-05-24 15:02:16 -0700196 // versioned_ndk_headers {
Dan Albert269fab82017-02-15 17:31:33 -0800197 // name: "foo",
198 // from: "include",
199 // to: "",
200 // }
201 //
202 // Will install $SYSROOT/usr/include/foo/bar/baz.h. If `from` were instead
203 // "include/foo", it would have installed $SYSROOT/usr/include/bar/baz.h.
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800204 From *string
Dan Albert269fab82017-02-15 17:31:33 -0800205
206 // Install path within the sysroot. This is relative to usr/include.
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800207 To *string
Dan Albert269fab82017-02-15 17:31:33 -0800208
209 // Path to the NOTICE file associated with the headers.
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800210 License *string
Dan Albert269fab82017-02-15 17:31:33 -0800211}
212
213// Like ndk_headers, but preprocesses the headers with the bionic versioner:
214// https://android.googlesource.com/platform/bionic/+/master/tools/versioner/README.md.
215//
216// Unlike ndk_headers, we don't operate on a list of sources but rather a whole directory, the
217// module does not have the srcs property, and operates on a full directory (the `from` property).
218//
219// Note that this is really only built to handle bionic/libc/include.
Dan Albert97f9c962018-05-24 15:02:16 -0700220type versionedHeaderModule struct {
Dan Albert269fab82017-02-15 17:31:33 -0800221 android.ModuleBase
Spandan Dasa7da3f02023-09-28 19:30:51 +0000222 android.BazelModuleBase
Dan Albert269fab82017-02-15 17:31:33 -0800223
Dan Albert97f9c962018-05-24 15:02:16 -0700224 properties versionedHeaderProperties
Dan Albert269fab82017-02-15 17:31:33 -0800225
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000226 srcPaths android.Paths
Colin Cross0875c522017-11-28 17:34:01 -0800227 installPaths android.Paths
Colin Cross07e51612019-03-05 12:46:40 -0800228 licensePath android.Path
Dan Albert269fab82017-02-15 17:31:33 -0800229}
230
Spandan Das0773a602022-08-16 00:55:11 +0000231// Return the glob pattern to find all .h files beneath `dir`
232func headerGlobPattern(dir string) string {
233 return filepath.Join(dir, "**", "*.h")
234}
235
Dan Albert97f9c962018-05-24 15:02:16 -0700236func (m *versionedHeaderModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800237 if String(m.properties.License) == "" {
Dan Albert269fab82017-02-15 17:31:33 -0800238 ctx.PropertyErrorf("license", "field is required")
239 }
240
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800241 m.licensePath = android.PathForModuleSrc(ctx, String(m.properties.License))
Dan Albert269fab82017-02-15 17:31:33 -0800242
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800243 fromSrcPath := android.PathForModuleSrc(ctx, String(m.properties.From))
244 toOutputPath := getCurrentIncludePath(ctx).Join(ctx, String(m.properties.To))
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000245 m.srcPaths = ctx.GlobFiles(headerGlobPattern(fromSrcPath.String()), nil)
Dan Albert269fab82017-02-15 17:31:33 -0800246 var installPaths []android.WritablePath
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000247 for _, header := range m.srcPaths {
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800248 installDir := getHeaderInstallDir(ctx, header, String(m.properties.From), String(m.properties.To))
Dan Albert269fab82017-02-15 17:31:33 -0800249 installPath := installDir.Join(ctx, header.Base())
250 installPaths = append(installPaths, installPath)
Colin Cross0875c522017-11-28 17:34:01 -0800251 m.installPaths = append(m.installPaths, installPath)
Dan Albert269fab82017-02-15 17:31:33 -0800252 }
253
254 if len(m.installPaths) == 0 {
Nan Zhanga5e7cb42017-11-09 22:42:32 -0800255 ctx.ModuleErrorf("glob %q matched zero files", String(m.properties.From))
Dan Albert269fab82017-02-15 17:31:33 -0800256 }
257
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000258 processHeadersWithVersioner(ctx, fromSrcPath, toOutputPath, m.srcPaths, installPaths)
Dan Willemsenb916b802017-03-19 13:44:32 -0700259}
260
Spandan Dasa7da3f02023-09-28 19:30:51 +0000261func (h *versionedHeaderModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
262 props := bazel.BazelTargetModuleProperties{
263 Rule_class: "ndk_headers",
264 Bzl_load_location: "//build/bazel/rules/cc:ndk_headers.bzl",
265 }
266 globPattern := headerGlobPattern(proptools.String(h.properties.From))
267 attrs := &bazelNdkHeadersAttributes{
268 Strip_import_prefix: h.properties.From,
269 Import_prefix: h.properties.To,
270 Run_versioner: proptools.BoolPtr(true),
271 Hdrs: bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, []string{globPattern})),
272 }
273 ctx.CreateBazelTargetModule(
274 props,
275 android.CommonAttributes{Name: h.Name()},
276 attrs,
277 )
278}
279
Colin Cross07e51612019-03-05 12:46:40 -0800280func processHeadersWithVersioner(ctx android.ModuleContext, srcDir, outDir android.Path,
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000281 srcPaths android.Paths, installPaths []android.WritablePath) android.Path {
Dan Albert269fab82017-02-15 17:31:33 -0800282 // The versioner depends on a dependencies directory to simplify determining include paths
283 // when parsing headers. This directory contains architecture specific directories as well
284 // as a common directory, each of which contains symlinks to the actually directories to
285 // be included.
286 //
287 // ctx.Glob doesn't follow symlinks, so we need to do this ourselves so we correctly
288 // depend on these headers.
289 // TODO(http://b/35673191): Update the versioner to use a --sysroot.
290 depsPath := android.PathForSource(ctx, "bionic/libc/versioner-dependencies")
291 depsGlob := ctx.Glob(filepath.Join(depsPath.String(), "**/*"), nil)
292 for i, path := range depsGlob {
Colin Cross988414c2020-01-11 01:11:46 +0000293 if ctx.IsSymlink(path) {
294 dest := ctx.Readlink(path)
Dan Albert269fab82017-02-15 17:31:33 -0800295 // Additional .. to account for the symlink itself.
296 depsGlob[i] = android.PathForSource(
297 ctx, filepath.Clean(filepath.Join(path.String(), "..", dest)))
298 }
299 }
300
Dan Albertd2130a92017-03-29 18:33:28 -0700301 timestampFile := android.PathForModuleOut(ctx, "versioner.timestamp")
Colin Crossae887032017-10-23 17:16:14 -0700302 ctx.Build(pctx, android.BuildParams{
Dan Albert97f9c962018-05-24 15:02:16 -0700303 Rule: versionBionicHeaders,
Colin Cross67a5c132017-05-09 13:45:28 -0700304 Description: "versioner preprocess " + srcDir.Rel(),
Dan Albertd2130a92017-03-29 18:33:28 -0700305 Output: timestampFile,
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000306 Implicits: append(srcPaths, depsGlob...),
Dan Albert269fab82017-02-15 17:31:33 -0800307 ImplicitOutputs: installPaths,
308 Args: map[string]string{
309 "depsPath": depsPath.String(),
Dan Willemsenb916b802017-03-19 13:44:32 -0700310 "srcDir": srcDir.String(),
311 "outDir": outDir.String(),
Dan Albert269fab82017-02-15 17:31:33 -0800312 },
313 })
Dan Willemsenb916b802017-03-19 13:44:32 -0700314
315 return timestampFile
Dan Albert269fab82017-02-15 17:31:33 -0800316}
317
Patrice Arruda6ea42112019-04-03 08:43:30 -0700318// versioned_ndk_headers preprocesses the headers with the bionic versioner:
319// https://android.googlesource.com/platform/bionic/+/master/tools/versioner/README.md.
320// Unlike the ndk_headers soong module, versioned_ndk_headers operates on a
321// directory level specified in `from` property. This is only used to process
322// the bionic/libc/include directory.
Spandan Dasa7da3f02023-09-28 19:30:51 +0000323func VersionedNdkHeadersFactory() android.Module {
Dan Albert97f9c962018-05-24 15:02:16 -0700324 module := &versionedHeaderModule{}
Colin Cross36242852017-06-23 15:06:31 -0700325
326 module.AddProperties(&module.properties)
327
Dan Willemsen4f644da2018-10-10 17:18:08 -0700328 android.InitAndroidModule(module)
Spandan Dasa7da3f02023-09-28 19:30:51 +0000329 android.InitBazelModule(module)
Colin Cross36242852017-06-23 15:06:31 -0700330
331 return module
Dan Albert269fab82017-02-15 17:31:33 -0800332}
Dan Albertcb1b4b22018-05-24 15:06:11 -0700333
Spandan Das0773a602022-08-16 00:55:11 +0000334// preprocessed_ndk_header {
335//
336// name: "foo",
337// preprocessor: "foo.sh",
338// srcs: [...],
339// to: "android",
340//
341// }
Dan Albertcb1b4b22018-05-24 15:06:11 -0700342//
343// Will invoke the preprocessor as:
Colin Crossd079e0b2022-08-16 10:27:33 -0700344//
345// $preprocessor -o $SYSROOT/usr/include/android/needs_preproc.h $src
346//
Dan Albertcb1b4b22018-05-24 15:06:11 -0700347// For each src in srcs.
348type preprocessedHeadersProperties struct {
349 // The preprocessor to run. Must be a program inside the source directory
350 // with no dependencies.
351 Preprocessor *string
352
353 // Source path to the files to be preprocessed.
354 Srcs []string
355
356 // Source paths that should be excluded from the srcs glob.
357 Exclude_srcs []string
358
359 // Install path within the sysroot. This is relative to usr/include.
360 To *string
361
362 // Path to the NOTICE file associated with the headers.
363 License *string
364}
365
366type preprocessedHeadersModule struct {
367 android.ModuleBase
368
369 properties preprocessedHeadersProperties
370
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000371 srcPaths android.Paths
Dan Albertcb1b4b22018-05-24 15:06:11 -0700372 installPaths android.Paths
Colin Cross07e51612019-03-05 12:46:40 -0800373 licensePath android.Path
Dan Albertcb1b4b22018-05-24 15:06:11 -0700374}
375
Dan Albertcb1b4b22018-05-24 15:06:11 -0700376func (m *preprocessedHeadersModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
377 if String(m.properties.License) == "" {
378 ctx.PropertyErrorf("license", "field is required")
379 }
380
381 preprocessor := android.PathForModuleSrc(ctx, String(m.properties.Preprocessor))
382 m.licensePath = android.PathForModuleSrc(ctx, String(m.properties.License))
383
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000384 m.srcPaths = android.PathsForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs)
Dan Albertcb1b4b22018-05-24 15:06:11 -0700385 installDir := getCurrentIncludePath(ctx).Join(ctx, String(m.properties.To))
Aleksei Vetrov262ed1a2023-08-23 10:06:35 +0000386 for _, src := range m.srcPaths {
Dan Albertcb1b4b22018-05-24 15:06:11 -0700387 installPath := installDir.Join(ctx, src.Base())
388 m.installPaths = append(m.installPaths, installPath)
389
390 ctx.Build(pctx, android.BuildParams{
391 Rule: preprocessNdkHeader,
392 Description: "preprocess " + src.Rel(),
393 Input: src,
394 Output: installPath,
395 Args: map[string]string{
396 "preprocessor": preprocessor.String(),
397 },
398 })
399 }
400
401 if len(m.installPaths) == 0 {
402 ctx.ModuleErrorf("srcs %q matched zero files", m.properties.Srcs)
403 }
404}
405
Patrice Arruda6ea42112019-04-03 08:43:30 -0700406// preprocessed_ndk_headers preprocesses all the ndk headers listed in the srcs
407// property by executing the command defined in the preprocessor property.
Dan Albertcb1b4b22018-05-24 15:06:11 -0700408func preprocessedNdkHeadersFactory() android.Module {
409 module := &preprocessedHeadersModule{}
410
411 module.AddProperties(&module.properties)
412
Dan Willemsen4f644da2018-10-10 17:18:08 -0700413 android.InitAndroidModule(module)
Dan Albertcb1b4b22018-05-24 15:06:11 -0700414
415 return module
416}