blob: 7c081b6e56710534ad5905d8f7bef14986f0d4c9 [file] [log] [blame]
Colin Cross43f08db2018-11-12 10:13:39 -08001// Copyright 2018 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 (
Jiakai Zhangca9bc982021-09-09 08:09:41 +000018 "path/filepath"
19 "strings"
20
Colin Cross43f08db2018-11-12 10:13:39 -080021 "android/soong/android"
22 "android/soong/dexpreopt"
23)
24
Jiakai Zhangca9bc982021-09-09 08:09:41 +000025type DexpreopterInterface interface {
Martin Stjernholm6d415272020-01-31 17:10:36 +000026 IsInstallable() bool // Structs that embed dexpreopter must implement this.
27 dexpreoptDisabled(ctx android.BaseModuleContext) bool
Jiakai Zhangca9bc982021-09-09 08:09:41 +000028 DexpreoptBuiltInstalledForApex() []dexpreopterInstall
29 AndroidMkEntriesForApex() []android.AndroidMkEntries
30}
31
32type dexpreopterInstall struct {
33 // A unique name to distinguish an output from others for the same java library module. Usually in
34 // the form of `<arch>-<encoded-path>.odex/vdex/art`.
35 name string
36
37 // The name of the input java module.
38 moduleName string
39
40 // The path to the dexpreopt output on host.
41 outputPathOnHost android.Path
42
43 // The directory on the device for the output to install to.
44 installDirOnDevice android.InstallPath
45
46 // The basename (the last segment of the path) for the output to install as.
47 installFileOnDevice string
48}
49
50// The full module name of the output in the makefile.
51func (install *dexpreopterInstall) FullModuleName() string {
52 return install.moduleName + install.SubModuleName()
53}
54
55// The sub-module name of the output in the makefile (the name excluding the java module name).
56func (install *dexpreopterInstall) SubModuleName() string {
57 return "-dexpreopt-" + install.name
Martin Stjernholm6d415272020-01-31 17:10:36 +000058}
59
Colin Cross43f08db2018-11-12 10:13:39 -080060type dexpreopter struct {
61 dexpreoptProperties DexpreoptProperties
62
Colin Cross70dda7e2019-10-01 22:05:35 -070063 installPath android.InstallPath
Jaewoong Jungccbb3932019-04-15 09:48:31 -070064 uncompressedDex bool
65 isSDKLibrary bool
Ulya Trafimovich76b08522021-01-14 17:52:43 +000066 isApp bool
Jaewoong Jungccbb3932019-04-15 09:48:31 -070067 isTest bool
Jaewoong Jungccbb3932019-04-15 09:48:31 -070068 isPresignedPrebuilt bool
Colin Crossfa9bfcd2021-11-10 16:42:38 -080069 preventInstall bool
Colin Cross43f08db2018-11-12 10:13:39 -080070
Ulya Trafimovich8cbc5d22020-11-03 15:15:46 +000071 manifestFile android.Path
Ulya Trafimovich8c35fcf2021-02-17 16:23:28 +000072 statusFile android.WritablePath
Ulya Trafimovich8cbc5d22020-11-03 15:15:46 +000073 enforceUsesLibs bool
74 classLoaderContexts dexpreopt.ClassLoaderContextMap
Colin Cross50ddcc42019-05-16 12:28:22 -070075
Jiakai Zhangca9bc982021-09-09 08:09:41 +000076 // See the `dexpreopt` function for details.
77 builtInstalled string
78 builtInstalledForApex []dexpreopterInstall
Ulya Trafimovich76b08522021-01-14 17:52:43 +000079
Jeongik Chac6246672021-04-08 00:00:19 +090080 // The config is used for two purposes:
81 // - Passing dexpreopt information about libraries from Soong to Make. This is needed when
82 // a <uses-library> is defined in Android.bp, but used in Android.mk (see dex_preopt_config_merger.py).
83 // Note that dexpreopt.config might be needed even if dexpreopt is disabled for the library itself.
84 // - Dexpreopt post-processing (using dexpreopt artifacts from a prebuilt system image to incrementally
85 // dexpreopt another partition).
Ulya Trafimovich76b08522021-01-14 17:52:43 +000086 configPath android.WritablePath
Colin Cross43f08db2018-11-12 10:13:39 -080087}
88
89type DexpreoptProperties struct {
90 Dex_preopt struct {
Nicolas Geoffrayc1bf7242019-10-18 14:51:38 +010091 // If false, prevent dexpreopting. Defaults to true.
Colin Cross43f08db2018-11-12 10:13:39 -080092 Enabled *bool
93
94 // If true, generate an app image (.art file) for this module.
95 App_image *bool
96
97 // If true, use a checked-in profile to guide optimization. Defaults to false unless
98 // a matching profile is set or a profile is found in PRODUCT_DEX_PREOPT_PROFILE_DIR
99 // that matches the name of this module, in which case it is defaulted to true.
100 Profile_guided *bool
101
102 // If set, provides the path to profile relative to the Android.bp file. If not set,
103 // defaults to searching for a file that matches the name of this module in the default
104 // profile location set by PRODUCT_DEX_PREOPT_PROFILE_DIR, or empty if not found.
Colin Crossde4e4e62019-04-26 10:52:32 -0700105 Profile *string `android:"path"`
Colin Cross43f08db2018-11-12 10:13:39 -0800106 }
107}
108
Ulya Trafimovich6cf2c0c2020-04-24 12:15:20 +0100109func init() {
110 dexpreopt.DexpreoptRunningInSoong = true
111}
112
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000113func isApexVariant(ctx android.BaseModuleContext) bool {
114 apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
115 return !apexInfo.IsForPlatform()
116}
117
118func moduleName(ctx android.BaseModuleContext) string {
119 // Remove the "prebuilt_" prefix if the module is from a prebuilt because the prefix is not
120 // expected by dexpreopter.
121 return android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName())
122}
123
Martin Stjernholm6d415272020-01-31 17:10:36 +0000124func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
Martin Stjernholm40f9f3c2020-01-20 18:12:23 +0000125 global := dexpreopt.GetGlobalConfig(ctx)
Colin Cross69f59a32019-02-15 10:39:37 -0800126
127 if global.DisablePreopt {
Colin Cross800fe132019-02-11 14:21:24 -0800128 return true
129 }
130
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000131 if inList(moduleName(ctx), global.DisablePreoptModules) {
Colin Cross43f08db2018-11-12 10:13:39 -0800132 return true
133 }
134
Colin Cross43f08db2018-11-12 10:13:39 -0800135 if d.isTest {
136 return true
137 }
138
139 if !BoolDefault(d.dexpreoptProperties.Dex_preopt.Enabled, true) {
140 return true
141 }
142
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000143 if !ctx.Module().(DexpreopterInterface).IsInstallable() {
Martin Stjernholm6d415272020-01-31 17:10:36 +0000144 return true
145 }
146
147 if ctx.Host() {
Colin Crossdc2da912019-01-05 22:13:05 -0800148 return true
149 }
150
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000151 if isApexVariant(ctx) {
152 // Don't preopt APEX variant module unless the module is an APEX system server jar and we are
153 // building the entire system image.
154 if !global.ApexSystemServerJars.ContainsJar(moduleName(ctx)) || ctx.Config().UnbundledBuild() {
155 return true
156 }
157 } else {
158 // Don't preopt the platform variant of an APEX system server jar to avoid conflicts.
159 if global.ApexSystemServerJars.ContainsJar(moduleName(ctx)) {
160 return true
161 }
Yo Chiangdbdf8f92020-01-09 19:00:27 +0800162 }
163
Jiakai Zhang204356f2021-09-09 08:12:46 +0000164 if !android.IsModulePreferred(ctx.Module()) {
165 return true
166 }
167
Colin Cross43f08db2018-11-12 10:13:39 -0800168 // TODO: contains no java code
169
170 return false
171}
172
Martin Stjernholm6d415272020-01-31 17:10:36 +0000173func dexpreoptToolDepsMutator(ctx android.BottomUpMutatorContext) {
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000174 if d, ok := ctx.Module().(DexpreopterInterface); !ok || d.dexpreoptDisabled(ctx) {
Martin Stjernholm6d415272020-01-31 17:10:36 +0000175 return
176 }
177 dexpreopt.RegisterToolDeps(ctx)
178}
179
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000180func (d *dexpreopter) odexOnSystemOther(ctx android.ModuleContext, installPath android.InstallPath) bool {
181 return dexpreopt.OdexOnSystemOtherByName(moduleName(ctx), android.InstallPathToOnDevicePath(ctx, installPath), dexpreopt.GetGlobalConfig(ctx))
182}
183
184// Returns the install path of the dex jar of a module.
185//
186// Do not rely on `ApexInfo.ApexVariationName` because it can be something like "apex1000", rather
187// than the `name` in the path `/apex/<name>` as suggested in its comment.
188//
189// This function is on a best-effort basis. It cannot handle the case where an APEX jar is not a
190// system server jar, which is fine because we currently only preopt system server jars for APEXes.
191func (d *dexpreopter) getInstallPath(
192 ctx android.ModuleContext, defaultInstallPath android.InstallPath) android.InstallPath {
193 global := dexpreopt.GetGlobalConfig(ctx)
194 if global.ApexSystemServerJars.ContainsJar(moduleName(ctx)) {
195 dexLocation := dexpreopt.GetSystemServerDexLocation(global, moduleName(ctx))
196 return android.PathForModuleInPartitionInstall(ctx, "", strings.TrimPrefix(dexLocation, "/"))
197 }
198 if !d.dexpreoptDisabled(ctx) && isApexVariant(ctx) &&
199 filepath.Base(defaultInstallPath.PartitionDir()) != "apex" {
200 ctx.ModuleErrorf("unable to get the install path of the dex jar for dexpreopt")
201 }
202 return defaultInstallPath
Nicolas Geoffrayfa6e9ec2019-02-12 13:12:16 +0000203}
204
Paul Duffin612e6102021-02-02 13:38:13 +0000205func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.WritablePath) {
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000206 global := dexpreopt.GetGlobalConfig(ctx)
207
Martin Stjernholm6d415272020-01-31 17:10:36 +0000208 // TODO(b/148690468): The check on d.installPath is to bail out in cases where
209 // the dexpreopter struct hasn't been fully initialized before we're called,
210 // e.g. in aar.go. This keeps the behaviour that dexpreopting is effectively
211 // disabled, even if installable is true.
Ulya Trafimovich76b08522021-01-14 17:52:43 +0000212 if d.installPath.Base() == "." {
213 return
214 }
215
216 dexLocation := android.InstallPathToOnDevicePath(ctx, d.installPath)
217
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000218 providesUsesLib := moduleName(ctx)
Ulya Trafimovich76b08522021-01-14 17:52:43 +0000219 if ulib, ok := ctx.Module().(ProvidesUsesLib); ok {
220 name := ulib.ProvidesUsesLib()
221 if name != nil {
222 providesUsesLib = *name
223 }
224 }
225
Jeongik Cha4b073cd2021-06-08 11:35:00 +0900226 // If it is test, make config files regardless of its dexpreopt setting.
Jeongik Chac6246672021-04-08 00:00:19 +0900227 // The config files are required for apps defined in make which depend on the lib.
Jeongik Cha4b073cd2021-06-08 11:35:00 +0900228 if d.isTest && d.dexpreoptDisabled(ctx) {
Jaewoong Jung4b97a562020-12-17 09:43:28 -0800229 return
Nicolas Geoffrayfa6e9ec2019-02-12 13:12:16 +0000230 }
231
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000232 isSystemServerJar := global.SystemServerJars.ContainsJar(moduleName(ctx)) ||
233 global.ApexSystemServerJars.ContainsJar(moduleName(ctx))
Ulya Trafimovich9023b022021-03-22 16:02:28 +0000234
Colin Cross44df5812019-02-15 23:06:46 -0800235 bootImage := defaultBootImageConfig(ctx)
Vladimir Marko40139d62020-02-06 15:14:29 +0000236 if global.UseArtImage {
237 bootImage = artBootImageConfig(ctx)
238 }
Colin Cross43f08db2018-11-12 10:13:39 -0800239
Jiakai Zhang02669e82021-09-11 03:44:06 +0000240 dexFiles, dexLocations := bcpForDexpreopt(ctx, global.PreoptWithUpdatableBcp)
Ulya Trafimovich9023b022021-03-22 16:02:28 +0000241
David Srbeckyc177ebe2020-02-18 20:43:06 +0000242 targets := ctx.MultiTargets()
243 if len(targets) == 0 {
Colin Cross43f08db2018-11-12 10:13:39 -0800244 // assume this is a java library, dexpreopt for all arches for now
245 for _, target := range ctx.Config().Targets[android.Android] {
dimitry1f33e402019-03-26 12:39:31 +0100246 if target.NativeBridge == android.NativeBridgeDisabled {
David Srbeckyc177ebe2020-02-18 20:43:06 +0000247 targets = append(targets, target)
dimitry1f33e402019-03-26 12:39:31 +0100248 }
Colin Cross43f08db2018-11-12 10:13:39 -0800249 }
Ulya Trafimovich9023b022021-03-22 16:02:28 +0000250 if isSystemServerJar && !d.isSDKLibrary {
Colin Cross43f08db2018-11-12 10:13:39 -0800251 // If the module is not an SDK library and it's a system server jar, only preopt the primary arch.
David Srbeckyc177ebe2020-02-18 20:43:06 +0000252 targets = targets[:1]
Colin Cross43f08db2018-11-12 10:13:39 -0800253 }
254 }
Colin Cross43f08db2018-11-12 10:13:39 -0800255
David Srbeckyc177ebe2020-02-18 20:43:06 +0000256 var archs []android.ArchType
Colin Cross69f59a32019-02-15 10:39:37 -0800257 var images android.Paths
Ulya Trafimovich4d2eeed2019-11-08 10:54:21 +0000258 var imagesDeps []android.OutputPaths
David Srbeckyc177ebe2020-02-18 20:43:06 +0000259 for _, target := range targets {
260 archs = append(archs, target.Arch.ArchType)
261 variant := bootImage.getVariant(target)
Jeongik Chaa5969092021-05-07 18:53:21 +0900262 images = append(images, variant.imagePathOnHost)
David Srbeckyc177ebe2020-02-18 20:43:06 +0000263 imagesDeps = append(imagesDeps, variant.imagesDeps)
Colin Crossc7e40aa2019-02-08 21:37:00 -0800264 }
David Srbeckyab994982020-03-30 17:24:13 +0100265 // The image locations for all Android variants are identical.
Jeongik Cha4dda75e2021-04-27 23:56:44 +0900266 hostImageLocations, deviceImageLocations := bootImage.getAnyAndroidVariant().imageLocations()
Colin Crossc7e40aa2019-02-08 21:37:00 -0800267
Colin Cross43f08db2018-11-12 10:13:39 -0800268 var profileClassListing android.OptionalPath
Nicolas Geoffraye7102422019-07-24 13:19:29 +0100269 var profileBootListing android.OptionalPath
Colin Cross43f08db2018-11-12 10:13:39 -0800270 profileIsTextListing := false
271 if BoolDefault(d.dexpreoptProperties.Dex_preopt.Profile_guided, true) {
272 // If dex_preopt.profile_guided is not set, default it based on the existence of the
273 // dexprepot.profile option or the profile class listing.
274 if String(d.dexpreoptProperties.Dex_preopt.Profile) != "" {
275 profileClassListing = android.OptionalPathForPath(
276 android.PathForModuleSrc(ctx, String(d.dexpreoptProperties.Dex_preopt.Profile)))
Nicolas Geoffraye7102422019-07-24 13:19:29 +0100277 profileBootListing = android.ExistentPathForSource(ctx,
278 ctx.ModuleDir(), String(d.dexpreoptProperties.Dex_preopt.Profile)+"-boot")
Colin Cross43f08db2018-11-12 10:13:39 -0800279 profileIsTextListing = true
Dan Willemsen78d51b02020-06-24 16:33:31 -0700280 } else if global.ProfileDir != "" {
Colin Cross43f08db2018-11-12 10:13:39 -0800281 profileClassListing = android.ExistentPathForSource(ctx,
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000282 global.ProfileDir, moduleName(ctx)+".prof")
Colin Cross43f08db2018-11-12 10:13:39 -0800283 }
284 }
285
Ulya Trafimovich76b08522021-01-14 17:52:43 +0000286 // Full dexpreopt config, used to create dexpreopt build rules.
Martin Stjernholm8d80cee2020-01-31 17:44:54 +0000287 dexpreoptConfig := &dexpreopt.ModuleConfig{
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000288 Name: moduleName(ctx),
Victor Hsiehd181c8b2019-01-29 13:00:33 -0800289 DexLocation: dexLocation,
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000290 BuildPath: android.PathForModuleOut(ctx, "dexpreopt", moduleName(ctx)+".jar").OutputPath,
Colin Cross69f59a32019-02-15 10:39:37 -0800291 DexPath: dexJarFile,
Jeongik Cha33a3a812021-04-15 09:12:49 +0900292 ManifestPath: android.OptionalPathForPath(d.manifestFile),
Victor Hsiehd181c8b2019-01-29 13:00:33 -0800293 UncompressedDex: d.uncompressedDex,
294 HasApkLibraries: false,
295 PreoptFlags: nil,
Colin Cross43f08db2018-11-12 10:13:39 -0800296
Colin Cross69f59a32019-02-15 10:39:37 -0800297 ProfileClassListing: profileClassListing,
Colin Cross43f08db2018-11-12 10:13:39 -0800298 ProfileIsTextListing: profileIsTextListing,
Nicolas Geoffraye7102422019-07-24 13:19:29 +0100299 ProfileBootListing: profileBootListing,
Colin Cross43f08db2018-11-12 10:13:39 -0800300
Ulya Trafimovich8c35fcf2021-02-17 16:23:28 +0000301 EnforceUsesLibrariesStatusFile: dexpreopt.UsesLibrariesStatusFile(ctx),
302 EnforceUsesLibraries: d.enforceUsesLibs,
303 ProvidesUsesLibrary: providesUsesLib,
304 ClassLoaderContexts: d.classLoaderContexts,
Colin Cross43f08db2018-11-12 10:13:39 -0800305
Jeongik Cha4dda75e2021-04-27 23:56:44 +0900306 Archs: archs,
307 DexPreoptImagesDeps: imagesDeps,
308 DexPreoptImageLocationsOnHost: hostImageLocations,
309 DexPreoptImageLocationsOnDevice: deviceImageLocations,
Colin Cross43f08db2018-11-12 10:13:39 -0800310
Ulya Trafimovich9023b022021-03-22 16:02:28 +0000311 PreoptBootClassPathDexFiles: dexFiles.Paths(),
Vladimir Marko40139d62020-02-06 15:14:29 +0000312 PreoptBootClassPathDexLocations: dexLocations,
Colin Cross800fe132019-02-11 14:21:24 -0800313
Colin Cross43f08db2018-11-12 10:13:39 -0800314 PreoptExtractedApk: false,
315
316 NoCreateAppImage: !BoolDefault(d.dexpreoptProperties.Dex_preopt.App_image, true),
317 ForceCreateAppImage: BoolDefault(d.dexpreoptProperties.Dex_preopt.App_image, false),
318
Jaewoong Jungccbb3932019-04-15 09:48:31 -0700319 PresignedPrebuilt: d.isPresignedPrebuilt,
Colin Cross43f08db2018-11-12 10:13:39 -0800320 }
321
Jeongik Chac6246672021-04-08 00:00:19 +0900322 d.configPath = android.PathForModuleOut(ctx, "dexpreopt", "dexpreopt.config")
323 dexpreopt.WriteModuleConfig(ctx, dexpreoptConfig, d.configPath)
324
325 if d.dexpreoptDisabled(ctx) {
326 return
327 }
328
329 globalSoong := dexpreopt.GetGlobalSoongConfig(ctx)
330
Martin Stjernholm75a48d82020-01-10 20:32:59 +0000331 dexpreoptRule, err := dexpreopt.GenerateDexpreoptRule(ctx, globalSoong, global, dexpreoptConfig)
Colin Cross43f08db2018-11-12 10:13:39 -0800332 if err != nil {
333 ctx.ModuleErrorf("error generating dexpreopt rule: %s", err.Error())
Jaewoong Jung4b97a562020-12-17 09:43:28 -0800334 return
Colin Cross43f08db2018-11-12 10:13:39 -0800335 }
336
Colin Crossf1a035e2020-11-16 17:32:30 -0800337 dexpreoptRule.Build("dexpreopt", "dexpreopt")
Colin Cross43f08db2018-11-12 10:13:39 -0800338
Colin Cross1d0eb7a2021-11-03 14:08:20 -0700339 for _, install := range dexpreoptRule.Installs() {
340 // Remove the "/" prefix because the path should be relative to $ANDROID_PRODUCT_OUT.
341 installDir := strings.TrimPrefix(filepath.Dir(install.To), "/")
342 installBase := filepath.Base(install.To)
343 arch := filepath.Base(installDir)
344 installPath := android.PathForModuleInPartitionInstall(ctx, "", installDir)
345
346 if global.ApexSystemServerJars.ContainsJar(moduleName(ctx)) {
347 // APEX variants of java libraries are hidden from Make, so their dexpreopt
348 // outputs need special handling. Currently, for APEX variants of java
349 // libraries, only those in the system server classpath are handled here.
350 // Preopting of boot classpath jars in the ART APEX are handled in
351 // java/dexpreopt_bootjars.go, and other APEX jars are not preopted.
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000352 // The installs will be handled by Make as sub-modules of the java library.
353 d.builtInstalledForApex = append(d.builtInstalledForApex, dexpreopterInstall{
354 name: arch + "-" + installBase,
355 moduleName: moduleName(ctx),
356 outputPathOnHost: install.From,
357 installDirOnDevice: installPath,
358 installFileOnDevice: installBase,
359 })
Colin Crossfa9bfcd2021-11-10 16:42:38 -0800360 } else if !d.preventInstall {
Colin Cross1d0eb7a2021-11-03 14:08:20 -0700361 ctx.InstallFile(installPath, installBase, install.From)
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000362 }
Colin Cross1d0eb7a2021-11-03 14:08:20 -0700363 }
364
365 if !global.ApexSystemServerJars.ContainsJar(moduleName(ctx)) {
Jiakai Zhangca9bc982021-09-09 08:09:41 +0000366 d.builtInstalled = dexpreoptRule.Installs().String()
367 }
368}
369
370func (d *dexpreopter) DexpreoptBuiltInstalledForApex() []dexpreopterInstall {
371 return d.builtInstalledForApex
372}
373
374func (d *dexpreopter) AndroidMkEntriesForApex() []android.AndroidMkEntries {
375 var entries []android.AndroidMkEntries
376 for _, install := range d.builtInstalledForApex {
377 install := install
378 entries = append(entries, android.AndroidMkEntries{
379 Class: "ETC",
380 SubName: install.SubModuleName(),
381 OutputFile: android.OptionalPathForPath(install.outputPathOnHost),
382 ExtraEntries: []android.AndroidMkExtraEntriesFunc{
383 func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
384 entries.SetString("LOCAL_MODULE_PATH", install.installDirOnDevice.ToMakePath().String())
385 entries.SetString("LOCAL_INSTALLED_MODULE_STEM", install.installFileOnDevice)
386 entries.SetString("LOCAL_NOT_AVAILABLE_FOR_PLATFORM", "false")
387 },
388 },
389 })
390 }
391 return entries
Colin Cross43f08db2018-11-12 10:13:39 -0800392}