diff options
Diffstat (limited to 'cc/library.go')
| -rw-r--r-- | cc/library.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cc/library.go b/cc/library.go index c7c114266..3d463bdbc 100644 --- a/cc/library.go +++ b/cc/library.go @@ -156,7 +156,7 @@ type flagExporter struct { } func (f *flagExporter) exportedIncludes(ctx ModuleContext) android.Paths { - if ctx.Vendor() && f.Properties.Target.Vendor.Export_include_dirs != nil { + if ctx.vndk() && f.Properties.Target.Vendor.Export_include_dirs != nil { return android.PathsForModuleSrc(ctx, f.Properties.Target.Vendor.Export_include_dirs) } else { return android.PathsForModuleSrc(ctx, f.Properties.Export_include_dirs) @@ -351,7 +351,7 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa } return Objects{} } - if (ctx.createVndkSourceAbiDump() || (library.sabi.Properties.CreateSAbiDumps && ctx.Device())) && !ctx.Vendor() { + if ctx.createVndkSourceAbiDump() { exportIncludeDirs := android.PathsForModuleSrc(ctx, library.flagExporter.Properties.Export_include_dirs) var SourceAbiFlags []string for _, dir := range exportIncludeDirs.Strings() { @@ -596,7 +596,7 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext, func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objects, fileName string, soFile android.Path) { //Also take into account object re-use. - if len(objs.sAbiDumpFiles) > 0 && ctx.createVndkSourceAbiDump() && !ctx.Vendor() { + if len(objs.sAbiDumpFiles) > 0 && ctx.createVndkSourceAbiDump() { refSourceDumpFile := android.PathForVndkRefAbiDump(ctx, "current", fileName, vndkVsNdk(ctx), true) versionScript := android.OptionalPathForModuleSrc(ctx, library.Properties.Version_script) var symbolFile android.OptionalPath @@ -699,6 +699,15 @@ func (library *libraryDecorator) toc() android.OptionalPath { func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) { if library.shared() { + if ctx.Device() { + if ctx.vndk() { + if ctx.isVndkSp() { + library.baseInstaller.subDir = "vndk-sp" + } else if ctx.isVndk() { + library.baseInstaller.subDir = "vndk" + } + } + } library.baseInstaller.install(ctx, file) } } |