Loading android/androidmk.go +1 −1 Original line number Diff line number Diff line Loading @@ -518,7 +518,7 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint a.AddStrings("LOCAL_TARGET_REQUIRED_MODULES", a.Target_required...) // If the install rule was generated by Soong tell Make about it. if amod.InstallBypassMake() && len(base.katiInstalls) > 0 { if len(base.katiInstalls) > 0 { // Assume the primary install file is last since it probably needs to depend on any other // installed files. If that is not the case we can add a method to specify the primary // installed file. Loading android/config.go +0 −9 Original line number Diff line number Diff line Loading @@ -569,9 +569,6 @@ 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) if ctx.Config().KatiEnabled() { path = path.ToMakePath() } return path } Loading @@ -581,17 +578,11 @@ 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, tool string) Path { path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool) if ctx.Config().KatiEnabled() { path = path.ToMakePath() } return path } Loading android/module.go +3 −19 Original line number Diff line number Diff line Loading @@ -429,7 +429,6 @@ type ModuleContext interface { InstallInRecovery() bool InstallInRoot() bool InstallInVendor() bool InstallBypassMake() bool InstallForceOS() (*OsType, *ArchType) RequiredModuleNames() []string Loading Loading @@ -496,7 +495,6 @@ type Module interface { InstallInRecovery() bool InstallInRoot() bool InstallInVendor() bool InstallBypassMake() bool InstallForceOS() (*OsType, *ArchType) HideFromMake() IsHideFromMake() bool Loading Loading @@ -1704,10 +1702,6 @@ func (m *ModuleBase) InstallInRoot() bool { return false } func (m *ModuleBase) InstallBypassMake() bool { return true } func (m *ModuleBase) InstallForceOS() (*OsType, *ArchType) { return nil, nil } Loading Loading @@ -2829,10 +2823,6 @@ func (m *moduleContext) InstallInRoot() bool { return m.module.InstallInRoot() } func (m *moduleContext) InstallBypassMake() bool { return m.module.InstallBypassMake() } func (m *moduleContext) InstallForceOS() (*OsType, *ArchType) { return m.module.InstallForceOS() } Loading @@ -2857,12 +2847,6 @@ func (m *moduleContext) skipInstall() bool { return true } if m.Device() { if m.Config().KatiEnabled() && !m.InstallBypassMake() { return true } } return false } Loading Loading @@ -2921,7 +2905,7 @@ func (m *moduleContext) installFile(installPath InstallPath, name string, srcPat orderOnlyDeps = deps } if m.Config().KatiEnabled() && m.InstallBypassMake() { if m.Config().KatiEnabled() { // When creating the install rule in Soong but embedding in Make, write the rule to a // makefile instead of directly to the ninja file so that main.mk can add the // dependencies from the `required` property that are hard to resolve in Soong. Loading Loading @@ -2980,7 +2964,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src } if !m.skipInstall() { if m.Config().KatiEnabled() && m.InstallBypassMake() { if m.Config().KatiEnabled() { // When creating the symlink rule in Soong but embedding in Make, write the rule to a // makefile instead of directly to the ninja file so that main.mk can add the // dependencies from the `required` property that are hard to resolve in Soong. Loading Loading @@ -3026,7 +3010,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str m.module.base().hooks.runInstallHooks(m, nil, fullInstallPath, true) if !m.skipInstall() { if m.Config().KatiEnabled() && m.InstallBypassMake() { if m.Config().KatiEnabled() { // When creating the symlink rule in Soong but embedding in Make, write the rule to a // makefile instead of directly to the ninja file so that main.mk can add the // dependencies from the `required` property that are hard to resolve in Soong. Loading android/module_test.go +1 −5 Original line number Diff line number Diff line Loading @@ -204,10 +204,6 @@ type depsModule struct { } } func (m *depsModule) InstallBypassMake() bool { return true } func (m *depsModule) GenerateAndroidBuildActions(ctx ModuleContext) { outputFile := PathForModuleOut(ctx, ctx.ModuleName()) ctx.Build(pctx, BuildParams{ Loading Loading @@ -450,7 +446,7 @@ func TestInstall(t *testing.T) { assertOrderOnlys(symlinkRule("foo")) } func TestInstallBypassMake(t *testing.T) { func TestInstallKatiEnabled(t *testing.T) { if runtime.GOOS != "linux" { t.Skip("requires linux") } Loading android/paths.go +6 −14 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ type ModuleInstallPathContext interface { InstallInDebugRamdisk() bool InstallInRecovery() bool InstallInRoot() bool InstallBypassMake() bool InstallForceOS() (*OsType, *ArchType) } Loading Loading @@ -465,9 +464,6 @@ 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) if ctx.Config().KatiEnabled() { goBinaryInstallDir = goBinaryInstallDir.ToMakePath() } rel := Rel(ctx, goBinaryInstallDir.String(), goBinary.InstallPath()) return goBinaryInstallDir.Join(ctx, rel) } Loading Loading @@ -1646,8 +1642,8 @@ func (p InstallPath) withRel(rel string) InstallPath { return p } // ToMakePath returns a new InstallPath that points to Make's install directory instead of Soong's, // i.e. out/ instead of out/soong/. // Deprecated: ToMakePath is a noop, PathForModuleInstall always returns Make paths when building // embedded in Make. func (p InstallPath) ToMakePath() InstallPath { p.makePath = true return p Loading Loading @@ -1688,9 +1684,6 @@ func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) { func makePathForInstall(ctx ModuleInstallPathContext, os OsType, arch ArchType, partition string, debug bool, pathComponents ...string) InstallPath { ret := pathForInstall(ctx, os, arch, partition, debug, pathComponents...) if ctx.InstallBypassMake() && ctx.Config().KatiEnabled() { ret = ret.ToMakePath() } return ret } Loading Loading @@ -1732,7 +1725,10 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, soongOutDir: ctx.Config().soongOutDir, partitionDir: partionPath, partition: partition, makePath: false, } if ctx.Config().KatiEnabled() { base.makePath = true } return base.Join(ctx, pathComponents...) Loading Loading @@ -2008,10 +2004,6 @@ func (m testModuleInstallPathContext) InstallInRoot() bool { return m.inRoot } func (m testModuleInstallPathContext) InstallBypassMake() bool { return false } func (m testModuleInstallPathContext) InstallForceOS() (*OsType, *ArchType) { return m.forceOS, m.forceArch } Loading Loading
android/androidmk.go +1 −1 Original line number Diff line number Diff line Loading @@ -518,7 +518,7 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint a.AddStrings("LOCAL_TARGET_REQUIRED_MODULES", a.Target_required...) // If the install rule was generated by Soong tell Make about it. if amod.InstallBypassMake() && len(base.katiInstalls) > 0 { if len(base.katiInstalls) > 0 { // Assume the primary install file is last since it probably needs to depend on any other // installed files. If that is not the case we can add a method to specify the primary // installed file. Loading
android/config.go +0 −9 Original line number Diff line number Diff line Loading @@ -569,9 +569,6 @@ 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) if ctx.Config().KatiEnabled() { path = path.ToMakePath() } return path } Loading @@ -581,17 +578,11 @@ 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, tool string) Path { path := pathForInstall(ctx, ctx.Config().BuildOS, ctx.Config().BuildArch, "framework", false, tool) if ctx.Config().KatiEnabled() { path = path.ToMakePath() } return path } Loading
android/module.go +3 −19 Original line number Diff line number Diff line Loading @@ -429,7 +429,6 @@ type ModuleContext interface { InstallInRecovery() bool InstallInRoot() bool InstallInVendor() bool InstallBypassMake() bool InstallForceOS() (*OsType, *ArchType) RequiredModuleNames() []string Loading Loading @@ -496,7 +495,6 @@ type Module interface { InstallInRecovery() bool InstallInRoot() bool InstallInVendor() bool InstallBypassMake() bool InstallForceOS() (*OsType, *ArchType) HideFromMake() IsHideFromMake() bool Loading Loading @@ -1704,10 +1702,6 @@ func (m *ModuleBase) InstallInRoot() bool { return false } func (m *ModuleBase) InstallBypassMake() bool { return true } func (m *ModuleBase) InstallForceOS() (*OsType, *ArchType) { return nil, nil } Loading Loading @@ -2829,10 +2823,6 @@ func (m *moduleContext) InstallInRoot() bool { return m.module.InstallInRoot() } func (m *moduleContext) InstallBypassMake() bool { return m.module.InstallBypassMake() } func (m *moduleContext) InstallForceOS() (*OsType, *ArchType) { return m.module.InstallForceOS() } Loading @@ -2857,12 +2847,6 @@ func (m *moduleContext) skipInstall() bool { return true } if m.Device() { if m.Config().KatiEnabled() && !m.InstallBypassMake() { return true } } return false } Loading Loading @@ -2921,7 +2905,7 @@ func (m *moduleContext) installFile(installPath InstallPath, name string, srcPat orderOnlyDeps = deps } if m.Config().KatiEnabled() && m.InstallBypassMake() { if m.Config().KatiEnabled() { // When creating the install rule in Soong but embedding in Make, write the rule to a // makefile instead of directly to the ninja file so that main.mk can add the // dependencies from the `required` property that are hard to resolve in Soong. Loading Loading @@ -2980,7 +2964,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src } if !m.skipInstall() { if m.Config().KatiEnabled() && m.InstallBypassMake() { if m.Config().KatiEnabled() { // When creating the symlink rule in Soong but embedding in Make, write the rule to a // makefile instead of directly to the ninja file so that main.mk can add the // dependencies from the `required` property that are hard to resolve in Soong. Loading Loading @@ -3026,7 +3010,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str m.module.base().hooks.runInstallHooks(m, nil, fullInstallPath, true) if !m.skipInstall() { if m.Config().KatiEnabled() && m.InstallBypassMake() { if m.Config().KatiEnabled() { // When creating the symlink rule in Soong but embedding in Make, write the rule to a // makefile instead of directly to the ninja file so that main.mk can add the // dependencies from the `required` property that are hard to resolve in Soong. Loading
android/module_test.go +1 −5 Original line number Diff line number Diff line Loading @@ -204,10 +204,6 @@ type depsModule struct { } } func (m *depsModule) InstallBypassMake() bool { return true } func (m *depsModule) GenerateAndroidBuildActions(ctx ModuleContext) { outputFile := PathForModuleOut(ctx, ctx.ModuleName()) ctx.Build(pctx, BuildParams{ Loading Loading @@ -450,7 +446,7 @@ func TestInstall(t *testing.T) { assertOrderOnlys(symlinkRule("foo")) } func TestInstallBypassMake(t *testing.T) { func TestInstallKatiEnabled(t *testing.T) { if runtime.GOOS != "linux" { t.Skip("requires linux") } Loading
android/paths.go +6 −14 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ type ModuleInstallPathContext interface { InstallInDebugRamdisk() bool InstallInRecovery() bool InstallInRoot() bool InstallBypassMake() bool InstallForceOS() (*OsType, *ArchType) } Loading Loading @@ -465,9 +464,6 @@ 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) if ctx.Config().KatiEnabled() { goBinaryInstallDir = goBinaryInstallDir.ToMakePath() } rel := Rel(ctx, goBinaryInstallDir.String(), goBinary.InstallPath()) return goBinaryInstallDir.Join(ctx, rel) } Loading Loading @@ -1646,8 +1642,8 @@ func (p InstallPath) withRel(rel string) InstallPath { return p } // ToMakePath returns a new InstallPath that points to Make's install directory instead of Soong's, // i.e. out/ instead of out/soong/. // Deprecated: ToMakePath is a noop, PathForModuleInstall always returns Make paths when building // embedded in Make. func (p InstallPath) ToMakePath() InstallPath { p.makePath = true return p Loading Loading @@ -1688,9 +1684,6 @@ func osAndArch(ctx ModuleInstallPathContext) (OsType, ArchType) { func makePathForInstall(ctx ModuleInstallPathContext, os OsType, arch ArchType, partition string, debug bool, pathComponents ...string) InstallPath { ret := pathForInstall(ctx, os, arch, partition, debug, pathComponents...) if ctx.InstallBypassMake() && ctx.Config().KatiEnabled() { ret = ret.ToMakePath() } return ret } Loading Loading @@ -1732,7 +1725,10 @@ func pathForInstall(ctx PathContext, os OsType, arch ArchType, partition string, soongOutDir: ctx.Config().soongOutDir, partitionDir: partionPath, partition: partition, makePath: false, } if ctx.Config().KatiEnabled() { base.makePath = true } return base.Join(ctx, pathComponents...) Loading Loading @@ -2008,10 +2004,6 @@ func (m testModuleInstallPathContext) InstallInRoot() bool { return m.inRoot } func (m testModuleInstallPathContext) InstallBypassMake() bool { return false } func (m testModuleInstallPathContext) InstallForceOS() (*OsType, *ArchType) { return m.forceOS, m.forceArch } Loading