summaryrefslogtreecommitdiff
path: root/android/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/config.go')
-rw-r--r--android/config.go27
1 files changed, 20 insertions, 7 deletions
diff --git a/android/config.go b/android/config.go
index 78d43c6d4..6f055650b 100644
--- a/android/config.go
+++ b/android/config.go
@@ -155,6 +155,7 @@ type config struct {
fs pathtools.FileSystem
mockBpList string
+ runningAsBp2Build bool
bp2buildPackageConfig Bp2BuildConfig
bp2buildModuleTypeConfig map[string]bool
@@ -333,10 +334,8 @@ func TestConfig(buildDir string, env map[string]string, bp string, fs map[string
ShippingApiLevel: stringPtr("30"),
},
- outDir: buildDir,
- // soongOutDir is inconsistent with production (it should be buildDir + "/soong")
- // but a lot of tests assume this :(
- soongOutDir: buildDir,
+ outDir: buildDir,
+ soongOutDir: filepath.Join(buildDir, "soong"),
captureBuild: true,
env: envCopy,
@@ -564,11 +563,18 @@ func (c *config) SetAllowMissingDependencies() {
// BlueprintToolLocation returns the directory containing build system tools
// from Blueprint, like soong_zip and merge_zips.
func (c *config) HostToolDir() string {
- return filepath.Join(c.soongOutDir, "host", c.PrebuiltOS(), "bin")
+ if c.KatiEnabled() {
+ return filepath.Join(c.outDir, "host", c.PrebuiltOS(), "bin")
+ } else {
+ return filepath.Join(c.soongOutDir, "host", c.PrebuiltOS(), "bin")
+ }
}
func (c *config) HostToolPath(ctx PathContext, tool string) Path {
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool)
+ if ctx.Config().KatiEnabled() {
+ path = path.ToMakePath()
+ }
return path
}
@@ -578,11 +584,18 @@ func (c *config) HostJNIToolPath(ctx PathContext, lib string) Path {
ext = ".dylib"
}
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", false, lib+ext)
+ if ctx.Config().KatiEnabled() {
+ path = path.ToMakePath()
+ }
return path
}
-func (c *config) HostJavaToolPath(ctx PathContext, path string) Path {
- return PathForOutput(ctx, "host", c.PrebuiltOS(), "framework", path)
+func (c *config) HostJavaToolPath(ctx PathContext, tool string) Path {
+ path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool)
+ if ctx.Config().KatiEnabled() {
+ path = path.ToMakePath()
+ }
+ return path
}
// PrebuiltOS returns the name of the host OS used in prebuilts directories.