summaryrefslogtreecommitdiff
path: root/android/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/config.go')
-rw-r--r--android/config.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/android/config.go b/android/config.go
index a4990576e..e87a4ac2a 100644
--- a/android/config.go
+++ b/android/config.go
@@ -974,13 +974,21 @@ func (c *config) ModulesLoadedByPrivilegedModules() []string {
return c.productVariables.ModulesLoadedByPrivilegedModules
}
-func (c *config) DexpreoptGlobalConfig(ctx PathContext) ([]byte, error) {
+func (c *config) DexpreoptGlobalConfigPath(ctx PathContext) OptionalPath {
if c.productVariables.DexpreoptGlobalConfig == nil {
+ return OptionalPathForPath(nil)
+ }
+ return OptionalPathForPath(
+ pathForBuildToolDep(ctx, *c.productVariables.DexpreoptGlobalConfig))
+}
+
+func (c *config) DexpreoptGlobalConfig(ctx PathContext) ([]byte, error) {
+ path := c.DexpreoptGlobalConfigPath(ctx)
+ if !path.Valid() {
return nil, nil
}
- path := absolutePath(*c.productVariables.DexpreoptGlobalConfig)
- ctx.AddNinjaFileDeps(path)
- return ioutil.ReadFile(path)
+ ctx.AddNinjaFileDeps(path.String())
+ return ioutil.ReadFile(absolutePath(path.String()))
}
func (c *config) FrameworksBaseDirExists(ctx PathContext) bool {