diff options
Diffstat (limited to 'cc/installer.go')
| -rw-r--r-- | cc/installer.go | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/cc/installer.go b/cc/installer.go index bd8f9e791..0b4a68cc8 100644 --- a/cc/installer.go +++ b/cc/installer.go @@ -52,7 +52,7 @@ type baseInstaller struct { relative string location installLocation - path android.OutputPath + path android.InstallPath } var _ installer = (*baseInstaller)(nil) @@ -61,16 +61,22 @@ func (installer *baseInstaller) installerProps() []interface{} { return []interface{}{&installer.Properties} } -func (installer *baseInstaller) installDir(ctx ModuleContext) android.OutputPath { +func (installer *baseInstaller) installDir(ctx ModuleContext) android.InstallPath { dir := installer.dir if ctx.toolchain().Is64Bit() && installer.dir64 != "" { dir = installer.dir64 } - if !ctx.Host() && !ctx.Arch().Native { + if ctx.Target().NativeBridge == android.NativeBridgeEnabled { + dir = filepath.Join(dir, ctx.Target().NativeBridgeRelativePath) + } else if !ctx.Host() && ctx.Config().HasMultilibConflict(ctx.Arch().ArchType) { dir = filepath.Join(dir, ctx.Arch().ArchType.String()) } if installer.location == InstallInData && ctx.useVndk() { - dir = filepath.Join(dir, "vendor") + if ctx.inProduct() { + dir = filepath.Join(dir, "product") + } else { + dir = filepath.Join(dir, "vendor") + } } return android.PathForModuleInstall(ctx, dir, installer.subDir, installer.relativeInstallPath(), installer.relative) @@ -80,6 +86,11 @@ func (installer *baseInstaller) install(ctx ModuleContext, file android.Path) { installer.path = ctx.InstallFile(installer.installDir(ctx), file.Base(), file) } +func (installer *baseInstaller) everInstallable() bool { + // Most cc modules are installable. + return true +} + func (installer *baseInstaller) inData() bool { return installer.location == InstallInData } @@ -95,3 +106,7 @@ func (installer *baseInstaller) hostToolPath() android.OptionalPath { func (installer *baseInstaller) relativeInstallPath() string { return String(installer.Properties.Relative_install_path) } + +func (installer *baseInstaller) skipInstall(mod *Module) { + mod.ModuleBase.SkipInstall() +} |