blob: f3074ed0a2b637360c681dd099e3ce9ab766bf9a [file] [log] [blame]
satayev95e9c5b2021-04-29 11:50:26 +01001// Copyright 2021 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
17import (
18 "android/soong/android"
satayev013485b2021-05-06 23:38:10 +010019 "android/soong/dexpreopt"
Colin Crossc33e5212021-05-25 18:16:02 -070020
satayev9366a052021-05-17 21:13:44 +010021 "github.com/google/blueprint"
Spandan Das7103c4f2024-11-11 22:31:55 +000022 "github.com/google/blueprint/proptools"
satayev95e9c5b2021-04-29 11:50:26 +010023)
24
25func init() {
26 registerSystemserverClasspathBuildComponents(android.InitRegistrationContext)
Jiakai Zhanga8d86602021-09-26 09:02:17 +000027
Paul Duffin4e7d1c42022-05-13 13:12:19 +000028 android.RegisterSdkMemberType(SystemServerClasspathFragmentSdkMemberType)
satayev95e9c5b2021-04-29 11:50:26 +010029}
30
31func registerSystemserverClasspathBuildComponents(ctx android.RegistrationContext) {
satayev95e9c5b2021-04-29 11:50:26 +010032 ctx.RegisterModuleType("platform_systemserverclasspath", platformSystemServerClasspathFactory)
satayevaa86bac2021-05-13 19:01:52 +010033 ctx.RegisterModuleType("systemserverclasspath_fragment", systemServerClasspathFactory)
Jiakai Zhangc9864272021-09-26 03:52:19 +000034 ctx.RegisterModuleType("prebuilt_systemserverclasspath_fragment", prebuiltSystemServerClasspathModuleFactory)
satayev95e9c5b2021-04-29 11:50:26 +010035}
36
Paul Duffin4e7d1c42022-05-13 13:12:19 +000037var SystemServerClasspathFragmentSdkMemberType = &systemServerClasspathFragmentMemberType{
38 SdkMemberTypeBase: android.SdkMemberTypeBase{
39 PropertyName: "systemserverclasspath_fragments",
40 SupportsSdk: true,
41
42 // Support for adding systemserverclasspath_fragments to the sdk snapshot was only added in
43 // Tiramisu.
44 SupportedBuildReleaseSpecification: "Tiramisu+",
45 },
46}
47
satayev95e9c5b2021-04-29 11:50:26 +010048type platformSystemServerClasspathModule struct {
49 android.ModuleBase
50
51 ClasspathFragmentBase
52}
53
54func platformSystemServerClasspathFactory() android.Module {
55 m := &platformSystemServerClasspathModule{}
56 initClasspathFragment(m, SYSTEMSERVERCLASSPATH)
57 android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
58 return m
59}
60
Colin Crosse5c7d7c2024-12-18 17:08:07 -080061func (m *platformSystemServerClasspathModule) UniqueApexVariations() bool {
62 return true
63}
64
satayevaa86bac2021-05-13 19:01:52 +010065func (p *platformSystemServerClasspathModule) AndroidMkEntries() (entries []android.AndroidMkEntries) {
66 return p.classpathFragmentBase().androidMkEntries()
satayev95e9c5b2021-04-29 11:50:26 +010067}
68
satayevaa86bac2021-05-13 19:01:52 +010069func (p *platformSystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
satayevb3090502021-06-15 17:49:10 +010070 configuredJars := p.configuredJars(ctx)
71 classpathJars := configuredJarListToClasspathJars(ctx, configuredJars, p.classpathType)
Jiakai Zhangcee9e192021-10-29 19:46:45 +000072 standaloneConfiguredJars := p.standaloneConfiguredJars(ctx)
73 standaloneClasspathJars := configuredJarListToClasspathJars(ctx, standaloneConfiguredJars, STANDALONE_SYSTEMSERVER_JARS)
Jiakai Zhang389a6472021-12-14 18:54:06 +000074 configuredJars = configuredJars.AppendList(&standaloneConfiguredJars)
Jiakai Zhangcee9e192021-10-29 19:46:45 +000075 classpathJars = append(classpathJars, standaloneClasspathJars...)
satayevb3090502021-06-15 17:49:10 +010076 p.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars, classpathJars)
Inseob Kimdd532492024-04-30 17:22:58 +090077 p.classpathFragmentBase().installClasspathProto(ctx)
satayev013485b2021-05-06 23:38:10 +010078}
79
satayev142ed272021-06-15 16:21:17 +010080func (p *platformSystemServerClasspathModule) configuredJars(ctx android.ModuleContext) android.ConfiguredJarList {
satayevb3090502021-06-15 17:49:10 +010081 // TODO(satayev): include any apex jars that don't populate their classpath proto config.
82 return dexpreopt.GetGlobalConfig(ctx).SystemServerJars
satayev95e9c5b2021-04-29 11:50:26 +010083}
satayevaa86bac2021-05-13 19:01:52 +010084
Jiakai Zhangcee9e192021-10-29 19:46:45 +000085func (p *platformSystemServerClasspathModule) standaloneConfiguredJars(ctx android.ModuleContext) android.ConfiguredJarList {
86 return dexpreopt.GetGlobalConfig(ctx).StandaloneSystemServerJars
87}
88
satayev333a1732021-05-17 21:35:26 +010089type SystemServerClasspathModule struct {
satayevaa86bac2021-05-13 19:01:52 +010090 android.ModuleBase
satayev333a1732021-05-17 21:35:26 +010091 android.ApexModuleBase
satayevaa86bac2021-05-13 19:01:52 +010092
93 ClasspathFragmentBase
satayev9366a052021-05-17 21:13:44 +010094
95 properties systemServerClasspathFragmentProperties
96}
97
satayev333a1732021-05-17 21:35:26 +010098func (s *SystemServerClasspathModule) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion android.ApiLevel) error {
99 return nil
100}
101
satayev9366a052021-05-17 21:13:44 +0100102type systemServerClasspathFragmentProperties struct {
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000103 // List of system_server classpath jars, could be either java_library, or java_sdk_library.
satayev9366a052021-05-17 21:13:44 +0100104 //
105 // The order of this list matters as it is the order that is used in the SYSTEMSERVERCLASSPATH.
Spandan Das7103c4f2024-11-11 22:31:55 +0000106 Contents proptools.Configurable[[]string] `android:"arch_variant"`
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000107
108 // List of jars that system_server loads dynamically using separate classloaders.
109 //
110 // The order does not matter.
Spandan Das7103c4f2024-11-11 22:31:55 +0000111 Standalone_contents proptools.Configurable[[]string] `android:"arch_variant"`
satayevaa86bac2021-05-13 19:01:52 +0100112}
113
114func systemServerClasspathFactory() android.Module {
satayev333a1732021-05-17 21:35:26 +0100115 m := &SystemServerClasspathModule{}
satayev9366a052021-05-17 21:13:44 +0100116 m.AddProperties(&m.properties)
satayev333a1732021-05-17 21:35:26 +0100117 android.InitApexModule(m)
satayevaa86bac2021-05-13 19:01:52 +0100118 initClasspathFragment(m, SYSTEMSERVERCLASSPATH)
119 android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
120 return m
121}
Colin Crosse5c7d7c2024-12-18 17:08:07 -0800122func (m *SystemServerClasspathModule) UniqueApexVariations() bool {
123 return true
124}
satayevaa86bac2021-05-13 19:01:52 +0100125
satayev333a1732021-05-17 21:35:26 +0100126func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
Spandan Das7103c4f2024-11-11 22:31:55 +0000127 if len(s.properties.Contents.GetOrDefault(ctx, nil)) == 0 && len(s.properties.Standalone_contents.GetOrDefault(ctx, nil)) == 0 {
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000128 ctx.PropertyErrorf("contents", "Either contents or standalone_contents needs to be non-empty")
satayev9366a052021-05-17 21:13:44 +0100129 }
130
satayevb3090502021-06-15 17:49:10 +0100131 configuredJars := s.configuredJars(ctx)
132 classpathJars := configuredJarListToClasspathJars(ctx, configuredJars, s.classpathType)
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000133 standaloneConfiguredJars := s.standaloneConfiguredJars(ctx)
134 standaloneClasspathJars := configuredJarListToClasspathJars(ctx, standaloneConfiguredJars, STANDALONE_SYSTEMSERVER_JARS)
Jiakai Zhang389a6472021-12-14 18:54:06 +0000135 configuredJars = configuredJars.AppendList(&standaloneConfiguredJars)
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000136 classpathJars = append(classpathJars, standaloneClasspathJars...)
satayevb3090502021-06-15 17:49:10 +0100137 s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJars, classpathJars)
Spandan Dasfbcd5fe2024-09-30 22:30:39 +0000138 s.setPartitionInfoOfLibraries(ctx)
139}
140
141// Map of java library name to their install partition.
142type LibraryNameToPartitionInfo struct {
143 LibraryNameToPartition map[string]string
144}
145
146// LibraryNameToPartitionInfoProvider will be used by the top-level apex to enforce that dexpreopt files
147// of apex system server jars are installed in the same partition as the top-level apex.
148var LibraryNameToPartitionInfoProvider = blueprint.NewProvider[LibraryNameToPartitionInfo]()
149
150func (s *SystemServerClasspathModule) setPartitionInfoOfLibraries(ctx android.ModuleContext) {
151 libraryNameToPartition := map[string]string{}
152 ctx.VisitDirectDepsWithTag(systemServerClasspathFragmentContentDepTag, func(m android.Module) {
153 libraryNameToPartition[m.Name()] = m.PartitionTag(ctx.DeviceConfig())
154 })
155 android.SetProvider(ctx, LibraryNameToPartitionInfoProvider, LibraryNameToPartitionInfo{
156 LibraryNameToPartition: libraryNameToPartition,
157 })
satayevaa86bac2021-05-13 19:01:52 +0100158}
159
satayev142ed272021-06-15 16:21:17 +0100160func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext) android.ConfiguredJarList {
satayev703c67a2021-05-20 21:33:41 +0100161 global := dexpreopt.GetGlobalConfig(ctx)
162
Spandan Das7103c4f2024-11-11 22:31:55 +0000163 possibleUpdatableModules := gatherPossibleApexModuleNamesAndStems(ctx, s.properties.Contents.GetOrDefault(ctx, nil), systemServerClasspathFragmentContentDepTag)
satayevd34eb0c2021-08-06 13:20:28 +0100164 jars, unknown := global.ApexSystemServerJars.Filter(possibleUpdatableModules)
165 // TODO(satayev): remove geotz ssc_fragment, since geotz is not part of SSCP anymore.
166 _, unknown = android.RemoveFromList("geotz", unknown)
Keun young Parkd64ab232021-10-18 08:42:23 -0700167 // This module only exists in car products.
168 // So ignore it even if it is not in PRODUCT_APEX_SYSTEM_SERVER_JARS.
169 // TODO(b/203233647): Add better mechanism to make it optional.
170 _, unknown = android.RemoveFromList("car-frameworks-service-module", unknown)
Samiul Islam7b385c52021-10-11 22:47:13 +0100171
Alan Stokesbcd567e2021-11-12 15:21:43 +0000172 // This module is optional, so it is not present in all products.
173 // (See PRODUCT_ISOLATED_COMPILATION_ENABLED.)
174 // So ignore it even if it is not in PRODUCT_APEX_SYSTEM_SERVER_JARS.
175 // TODO(b/203233647): Add better mechanism to make it optional.
176 _, unknown = android.RemoveFromList("service-compos", unknown)
177
Samiul Islam7b385c52021-10-11 22:47:13 +0100178 // TODO(satayev): for apex_test we want to include all contents unconditionally to classpaths
179 // config. However, any test specific jars would not be present in ApexSystemServerJars. Instead,
180 // we should check if we are creating a config for apex_test via ApexInfo and amend the values.
181 // This is an exception to support end-to-end test for ApexdUnitTests, until such support exists.
182 if android.InList("test_service-apexd", possibleUpdatableModules) {
183 jars = jars.Append("com.android.apex.test_package", "test_service-apexd")
Paul Duffin458a15b2022-11-25 12:18:24 +0000184 } else if global.ApexSystemServerJars.Len() > 0 && len(unknown) > 0 {
Samiul Islam7b385c52021-10-11 22:47:13 +0100185 // For non test apexes, make sure that all contents are actually declared in make.
Ulya Trafimoviche5b2b492021-10-04 15:42:53 +0100186 ctx.ModuleErrorf("%s in contents must also be declared in PRODUCT_APEX_SYSTEM_SERVER_JARS", unknown)
satayevd34eb0c2021-08-06 13:20:28 +0100187 }
188
189 return jars
satayevaa86bac2021-05-13 19:01:52 +0100190}
satayev9366a052021-05-17 21:13:44 +0100191
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000192func (s *SystemServerClasspathModule) standaloneConfiguredJars(ctx android.ModuleContext) android.ConfiguredJarList {
193 global := dexpreopt.GetGlobalConfig(ctx)
194
Spandan Das7103c4f2024-11-11 22:31:55 +0000195 possibleUpdatableModules := gatherPossibleApexModuleNamesAndStems(ctx, s.properties.Standalone_contents.GetOrDefault(ctx, nil), systemServerClasspathFragmentContentDepTag)
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000196 jars, _ := global.ApexStandaloneSystemServerJars.Filter(possibleUpdatableModules)
197
198 // TODO(jiakaiz): add a check to ensure that the contents are declared in make.
199
200 return jars
201}
202
satayev9366a052021-05-17 21:13:44 +0100203type systemServerClasspathFragmentContentDependencyTag struct {
204 blueprint.BaseDependencyTag
205}
206
Paul Duffin25322e42021-09-07 14:52:48 +0100207// The systemserverclasspath_fragment contents must never depend on prebuilts.
208func (systemServerClasspathFragmentContentDependencyTag) ReplaceSourceWithPrebuilt() bool {
209 return false
210}
211
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000212// SdkMemberType causes dependencies added with this tag to be automatically added to the sdk as if
213// they were specified using java_systemserver_libs or java_sdk_libs.
214func (b systemServerClasspathFragmentContentDependencyTag) SdkMemberType(child android.Module) android.SdkMemberType {
215 // If the module is a java_sdk_library then treat it as if it was specified in the java_sdk_libs
216 // property, otherwise treat if it was specified in the java_systemserver_libs property.
217 if javaSdkLibrarySdkMemberType.IsInstance(child) {
218 return javaSdkLibrarySdkMemberType
219 }
220
Spandan Das159b2642024-03-20 21:22:47 +0000221 return JavaSystemserverLibsSdkMemberType
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000222}
223
224func (b systemServerClasspathFragmentContentDependencyTag) ExportMember() bool {
225 return true
226}
227
Jiakai Zhang774dd302021-09-26 03:54:25 +0000228// Contents of system server fragments require files from prebuilt apex files.
229func (systemServerClasspathFragmentContentDependencyTag) RequiresFilesFromPrebuiltApex() {}
230
Paul Duffin25322e42021-09-07 14:52:48 +0100231var _ android.ReplaceSourceWithPrebuilt = systemServerClasspathFragmentContentDepTag
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000232var _ android.SdkMemberDependencyTag = systemServerClasspathFragmentContentDepTag
Jiakai Zhang774dd302021-09-26 03:54:25 +0000233var _ android.RequiresFilesFromPrebuiltApexTag = systemServerClasspathFragmentContentDepTag
Colin Crossc33e5212021-05-25 18:16:02 -0700234
satayev9366a052021-05-17 21:13:44 +0100235// The tag used for the dependency between the systemserverclasspath_fragment module and its contents.
236var systemServerClasspathFragmentContentDepTag = systemServerClasspathFragmentContentDependencyTag{}
237
238func IsSystemServerClasspathFragmentContentDepTag(tag blueprint.DependencyTag) bool {
239 return tag == systemServerClasspathFragmentContentDepTag
240}
241
Spandan Das746161d2024-08-21 22:47:53 +0000242// The dexpreopt artifacts of apex system server jars are installed onto system image.
243func (s systemServerClasspathFragmentContentDependencyTag) InstallDepNeeded() bool {
244 return true
245}
246
satayev333a1732021-05-17 21:35:26 +0100247func (s *SystemServerClasspathModule) ComponentDepsMutator(ctx android.BottomUpMutatorContext) {
satayev9366a052021-05-17 21:13:44 +0100248 module := ctx.Module()
Jiakai Zhangc9864272021-09-26 03:52:19 +0000249 _, isSourceModule := module.(*SystemServerClasspathModule)
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000250 var deps []string
Spandan Das7103c4f2024-11-11 22:31:55 +0000251 deps = append(deps, s.properties.Contents.GetOrDefault(ctx, nil)...)
252 deps = append(deps, s.properties.Standalone_contents.GetOrDefault(ctx, nil)...)
satayev9366a052021-05-17 21:13:44 +0100253
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000254 for _, name := range deps {
Jiakai Zhangc9864272021-09-26 03:52:19 +0000255 // A systemserverclasspath_fragment must depend only on other source modules, while the
256 // prebuilt_systemserverclasspath_fragment_fragment must only depend on other prebuilt modules.
257 if !isSourceModule {
258 name = android.PrebuiltNameFromSource(name)
259 }
satayev9366a052021-05-17 21:13:44 +0100260 ctx.AddDependency(module, systemServerClasspathFragmentContentDepTag, name)
261 }
262}
braleeb0c1f0c2021-06-07 22:49:13 +0800263
264// Collect information for opening IDE project files in java/jdeps.go.
Cole Faustb36d31d2024-08-27 16:04:28 -0700265func (s *SystemServerClasspathModule) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
Spandan Das7103c4f2024-11-11 22:31:55 +0000266 dpInfo.Deps = append(dpInfo.Deps, s.properties.Contents.GetOrDefault(ctx, nil)...)
267 dpInfo.Deps = append(dpInfo.Deps, s.properties.Standalone_contents.GetOrDefault(ctx, nil)...)
braleeb0c1f0c2021-06-07 22:49:13 +0800268}
Jiakai Zhangc9864272021-09-26 03:52:19 +0000269
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000270type systemServerClasspathFragmentMemberType struct {
271 android.SdkMemberTypeBase
272}
273
274func (s *systemServerClasspathFragmentMemberType) AddDependencies(ctx android.SdkDependencyContext, dependencyTag blueprint.DependencyTag, names []string) {
275 ctx.AddVariationDependencies(nil, dependencyTag, names...)
276}
277
278func (s *systemServerClasspathFragmentMemberType) IsInstance(module android.Module) bool {
279 _, ok := module.(*SystemServerClasspathModule)
280 return ok
281}
282
283func (s *systemServerClasspathFragmentMemberType) AddPrebuiltModule(ctx android.SdkMemberContext, member android.SdkMember) android.BpModule {
284 return ctx.SnapshotBuilder().AddPrebuiltModule(member, "prebuilt_systemserverclasspath_fragment")
285}
286
287func (s *systemServerClasspathFragmentMemberType) CreateVariantPropertiesStruct() android.SdkMemberProperties {
288 return &systemServerClasspathFragmentSdkMemberProperties{}
289}
290
291type systemServerClasspathFragmentSdkMemberProperties struct {
292 android.SdkMemberPropertiesBase
293
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000294 // List of system_server classpath jars, could be either java_library, or java_sdk_library.
295 //
296 // The order of this list matters as it is the order that is used in the SYSTEMSERVERCLASSPATH.
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000297 Contents []string
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000298
299 // List of jars that system_server loads dynamically using separate classloaders.
300 //
301 // The order does not matter.
302 Standalone_contents []string
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000303}
304
305func (s *systemServerClasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx android.SdkMemberContext, variant android.Module) {
306 module := variant.(*SystemServerClasspathModule)
307
Spandan Das7103c4f2024-11-11 22:31:55 +0000308 s.Contents = module.properties.Contents.GetOrDefault(ctx.SdkModuleContext(), nil)
309 s.Standalone_contents = module.properties.Standalone_contents.GetOrDefault(ctx.SdkModuleContext(), nil)
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000310}
311
312func (s *systemServerClasspathFragmentSdkMemberProperties) AddToPropertySet(ctx android.SdkMemberContext, propertySet android.BpPropertySet) {
313 builder := ctx.SnapshotBuilder()
314 requiredMemberDependency := builder.SdkMemberReferencePropertyTag(true)
315
316 if len(s.Contents) > 0 {
317 propertySet.AddPropertyWithTag("contents", s.Contents, requiredMemberDependency)
318 }
Jiakai Zhangcee9e192021-10-29 19:46:45 +0000319
320 if len(s.Standalone_contents) > 0 {
321 propertySet.AddPropertyWithTag("standalone_contents", s.Standalone_contents, requiredMemberDependency)
322 }
Jiakai Zhanga8d86602021-09-26 09:02:17 +0000323}
324
325var _ android.SdkMemberType = (*systemServerClasspathFragmentMemberType)(nil)
326
Jiakai Zhangc9864272021-09-26 03:52:19 +0000327// A prebuilt version of the systemserverclasspath_fragment module.
328type prebuiltSystemServerClasspathModule struct {
329 SystemServerClasspathModule
330 prebuilt android.Prebuilt
331}
332
333func (module *prebuiltSystemServerClasspathModule) Prebuilt() *android.Prebuilt {
334 return &module.prebuilt
335}
336
337func (module *prebuiltSystemServerClasspathModule) Name() string {
338 return module.prebuilt.Name(module.ModuleBase.Name())
339}
340
Jiakai Zhang774dd302021-09-26 03:54:25 +0000341func (module *prebuiltSystemServerClasspathModule) RequiredFilesFromPrebuiltApex(ctx android.BaseModuleContext) []string {
342 return nil
343}
344
Spandan Das2ea84dd2024-01-25 22:12:50 +0000345func (module *prebuiltSystemServerClasspathModule) UseProfileGuidedDexpreopt() bool {
346 return false
347}
348
Jiakai Zhang774dd302021-09-26 03:54:25 +0000349var _ android.RequiredFilesFromPrebuiltApex = (*prebuiltSystemServerClasspathModule)(nil)
350
Jiakai Zhangc9864272021-09-26 03:52:19 +0000351func prebuiltSystemServerClasspathModuleFactory() android.Module {
352 m := &prebuiltSystemServerClasspathModule{}
353 m.AddProperties(&m.properties)
354 // This doesn't actually have any prebuilt files of its own so pass a placeholder for the srcs
355 // array.
356 android.InitPrebuiltModule(m, &[]string{"placeholder"})
357 android.InitApexModule(m)
358 android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
359 return m
360}