Make HostToolPath, HostJNIToolPath and sboxPathForToolRel use pathForInstall

Use pathForInstall instead of PathForOutput for HostToolPath,
HostJNIToolPath and sboxPathForToolRel so that they internally produce
an InstallPath that can later support being converted to Make install
path.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie16a62641d113873daeec4d1dd4261251bc0d0eb
This commit is contained in:
Colin Cross
2021-10-25 19:15:55 -07:00
parent a44551fec6
commit 790ef35d1e
3 changed files with 13 additions and 10 deletions

View File

@@ -355,14 +355,14 @@ func TestConfig(buildDir string, env map[string]string, bp string, fs map[string
config.bp2buildModuleTypeConfig = map[string]bool{}
determineBuildOS(config)
return Config{config}
}
func modifyTestConfigToSupportArchMutator(testConfig Config) {
config := testConfig.config
determineBuildOS(config)
config.Targets = map[OsType][]Target{
Android: []Target{
{Android, Arch{ArchType: Arm64, ArchVariant: "armv8-a", Abi: []string{"arm64-v8a"}}, NativeBridgeDisabled, "", "", false},
@@ -568,15 +568,17 @@ func (c *config) HostToolDir() string {
}
func (c *config) HostToolPath(ctx PathContext, tool string) Path {
return PathForOutput(ctx, "host", c.PrebuiltOS(), "bin", tool)
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool)
return path
}
func (c *config) HostJNIToolPath(ctx PathContext, path string) Path {
func (c *config) HostJNIToolPath(ctx PathContext, lib string) Path {
ext := ".so"
if runtime.GOOS == "darwin" {
ext = ".dylib"
}
return PathForOutput(ctx, "host", c.PrebuiltOS(), "lib64", path+ext)
path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", false, lib+ext)
return path
}
func (c *config) HostJavaToolPath(ctx PathContext, path string) Path {