Loading android/config.go +4 −4 Original line number Diff line number Diff line Loading @@ -789,7 +789,7 @@ func (c *config) HostToolDir() string { } func (c *config) HostToolPath(ctx PathContext, tool string) Path { path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool) path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", tool) return path } Loading @@ -798,12 +798,12 @@ func (c *config) HostJNIToolPath(ctx PathContext, lib string) Path { if runtime.GOOS == "darwin" { ext = ".dylib" } path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", false, lib+ext) path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", lib+ext) return path } func (c *config) HostJavaToolPath(ctx PathContext, tool string) Path { path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool) path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", tool) return path } Loading @@ -812,7 +812,7 @@ func (c *config) HostCcSharedLibPath(ctx PathContext, lib string) Path { if ctx.Config().BuildArch.Multilib == "lib64" { libDir = "lib64" } return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, libDir, false, lib+".so") return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, libDir, lib+".so") } // PrebuiltOS returns the name of the host OS used in prebuilts directories. Loading android/module.go +0 −6 Original line number Diff line number Diff line Loading @@ -380,7 +380,6 @@ type BaseModuleContext interface { Device() bool Darwin() bool Windows() bool Debug() bool PrimaryArch() bool } Loading Loading @@ -2675,7 +2674,6 @@ type baseModuleContext struct { target Target multiTargets []Target targetPrimary bool debug bool walkPath []Module tagPath []blueprint.DependencyTag Loading Loading @@ -3306,10 +3304,6 @@ func (b *baseModuleContext) Windows() bool { return b.os == Windows } func (b *baseModuleContext) Debug() bool { return b.debug } func (b *baseModuleContext) PrimaryArch() bool { if len(b.config.Targets[b.target.Os]) <= 1 { return true Loading android/paths.go +5 −8 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ func (p OutputPaths) Strings() []string { // PathForGoBinary returns the path to the installed location of a bootstrap_go_binary module. func PathForGoBinary(ctx PathContext, goBinary bootstrap.GoBinaryTool) Path { goBinaryInstallDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false) goBinaryInstallDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin") rel := Rel(ctx, goBinaryInstallDir.String(), goBinary.InstallPath()) return goBinaryInstallDir.Join(ctx, rel) } Loading Loading @@ -1684,19 +1684,19 @@ func (p InstallPath) ToMakePath() InstallPath { func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string) InstallPath { os, arch := osAndArch(ctx) partition := modulePartition(ctx, os) return pathForInstall(ctx, os, arch, partition, ctx.Debug(), pathComponents...) return pathForInstall(ctx, os, arch, partition, pathComponents...) } // PathForHostDexInstall returns an InstallPath representing the install path for the // module appended with paths... func PathForHostDexInstall(ctx ModuleInstallPathContext, pathComponents ...string) InstallPath { return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", ctx.Debug(), pathComponents...) return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", pathComponents...) } // PathForModuleInPartitionInstall is similar to PathForModuleInstall but partition is provided by the caller func PathForModuleInPartitionInstall(ctx ModuleInstallPathContext, partition string, pathComponents ...string) InstallPath { os, arch := osAndArch(ctx) return pathForInstall(ctx, os, arch, partition, ctx.Debug(), pathComponents...) return pathForInstall(ctx, os, arch, partition, pathComponents...) } func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) { Loading @@ -1712,7 +1712,7 @@ func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) { return os, arch } func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, debug bool, func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, pathComponents ...string) InstallPath { var partitionPaths []string Loading Loading @@ -1742,9 +1742,6 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, } partitionPaths = []string{"host", osName + "-" + archName, partition} } if debug { partitionPaths = append([]string{"debug"}, partitionPaths...) } partitionPath, err := validatePath(partitionPaths...) if err != nil { Loading android/rule_builder.go +1 −1 Original line number Diff line number Diff line Loading @@ -871,7 +871,7 @@ func (c *RuleBuilderCommand) PathForOutput(path WritablePath) string { func sboxPathForToolRel(ctx BuilderContext, path Path) string { // Errors will be handled in RuleBuilder.Build where we have a context to report them toolDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", false) toolDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "") relOutSoong, isRelOutSoong, _ := maybeRelErr(toolDir.String(), path.String()) if isRelOutSoong { // The tool is in the Soong output directory, it will be copied to __SBOX_OUT_DIR__/tools/out Loading android/test_suites.go +2 −2 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ func robolectricTestSuite(ctx SingletonContext, files map[string]InstallPaths) W for _, module := range SortedKeys(files) { installedPaths = append(installedPaths, files[module]...) } testCasesDir := pathForInstall(ctx, ctx.Config().BuildOS, X86, "testcases", false) testCasesDir := pathForInstall(ctx, ctx.Config().BuildOS, X86, "testcases") outputFile := PathForOutput(ctx, "packaging", "robolectric-tests.zip") rule := NewRuleBuilder(pctx, ctx) Loading Loading
android/config.go +4 −4 Original line number Diff line number Diff line Loading @@ -789,7 +789,7 @@ func (c *config) HostToolDir() string { } func (c *config) HostToolPath(ctx PathContext, tool string) Path { path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false, tool) path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", tool) return path } Loading @@ -798,12 +798,12 @@ func (c *config) HostJNIToolPath(ctx PathContext, lib string) Path { if runtime.GOOS == "darwin" { ext = ".dylib" } path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", false, lib+ext) path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "lib64", lib+ext) return path } func (c *config) HostJavaToolPath(ctx PathContext, tool string) Path { path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool) path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", tool) return path } Loading @@ -812,7 +812,7 @@ func (c *config) HostCcSharedLibPath(ctx PathContext, lib string) Path { if ctx.Config().BuildArch.Multilib == "lib64" { libDir = "lib64" } return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, libDir, false, lib+".so") return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, libDir, lib+".so") } // PrebuiltOS returns the name of the host OS used in prebuilts directories. Loading
android/module.go +0 −6 Original line number Diff line number Diff line Loading @@ -380,7 +380,6 @@ type BaseModuleContext interface { Device() bool Darwin() bool Windows() bool Debug() bool PrimaryArch() bool } Loading Loading @@ -2675,7 +2674,6 @@ type baseModuleContext struct { target Target multiTargets []Target targetPrimary bool debug bool walkPath []Module tagPath []blueprint.DependencyTag Loading Loading @@ -3306,10 +3304,6 @@ func (b *baseModuleContext) Windows() bool { return b.os == Windows } func (b *baseModuleContext) Debug() bool { return b.debug } func (b *baseModuleContext) PrimaryArch() bool { if len(b.config.Targets[b.target.Os]) <= 1 { return true Loading
android/paths.go +5 −8 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ func (p OutputPaths) Strings() []string { // PathForGoBinary returns the path to the installed location of a bootstrap_go_binary module. func PathForGoBinary(ctx PathContext, goBinary bootstrap.GoBinaryTool) Path { goBinaryInstallDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin", false) goBinaryInstallDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "bin") rel := Rel(ctx, goBinaryInstallDir.String(), goBinary.InstallPath()) return goBinaryInstallDir.Join(ctx, rel) } Loading Loading @@ -1684,19 +1684,19 @@ func (p InstallPath) ToMakePath() InstallPath { func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string) InstallPath { os, arch := osAndArch(ctx) partition := modulePartition(ctx, os) return pathForInstall(ctx, os, arch, partition, ctx.Debug(), pathComponents...) return pathForInstall(ctx, os, arch, partition, pathComponents...) } // PathForHostDexInstall returns an InstallPath representing the install path for the // module appended with paths... func PathForHostDexInstall(ctx ModuleInstallPathContext, pathComponents ...string) InstallPath { return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", ctx.Debug(), pathComponents...) return pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", pathComponents...) } // PathForModuleInPartitionInstall is similar to PathForModuleInstall but partition is provided by the caller func PathForModuleInPartitionInstall(ctx ModuleInstallPathContext, partition string, pathComponents ...string) InstallPath { os, arch := osAndArch(ctx) return pathForInstall(ctx, os, arch, partition, ctx.Debug(), pathComponents...) return pathForInstall(ctx, os, arch, partition, pathComponents...) } func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) { Loading @@ -1712,7 +1712,7 @@ func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) { return os, arch } func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, debug bool, func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, pathComponents ...string) InstallPath { var partitionPaths []string Loading Loading @@ -1742,9 +1742,6 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, } partitionPaths = []string{"host", osName + "-" + archName, partition} } if debug { partitionPaths = append([]string{"debug"}, partitionPaths...) } partitionPath, err := validatePath(partitionPaths...) if err != nil { Loading
android/rule_builder.go +1 −1 Original line number Diff line number Diff line Loading @@ -871,7 +871,7 @@ func (c *RuleBuilderCommand) PathForOutput(path WritablePath) string { func sboxPathForToolRel(ctx BuilderContext, path Path) string { // Errors will be handled in RuleBuilder.Build where we have a context to report them toolDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "", false) toolDir := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "") relOutSoong, isRelOutSoong, _ := maybeRelErr(toolDir.String(), path.String()) if isRelOutSoong { // The tool is in the Soong output directory, it will be copied to __SBOX_OUT_DIR__/tools/out Loading
android/test_suites.go +2 −2 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ func robolectricTestSuite(ctx SingletonContext, files map[string]InstallPaths) W for _, module := range SortedKeys(files) { installedPaths = append(installedPaths, files[module]...) } testCasesDir := pathForInstall(ctx, ctx.Config().BuildOS, X86, "testcases", false) testCasesDir := pathForInstall(ctx, ctx.Config().BuildOS, X86, "testcases") outputFile := PathForOutput(ctx, "packaging", "robolectric-tests.zip") rule := NewRuleBuilder(pctx, ctx) Loading