diff options
author | Justin Yun <justinyun@google.com> | 2017-06-23 19:24:43 +0900 |
---|---|---|
committer | Justin Yun <justinyun@google.com> | 2017-07-18 14:48:29 +0900 |
commit | 8effde47def8609b08be27f75d9f24f8b943e3ed (patch) | |
tree | 223d67bd1a21ad363ba8eec952cbb1b24cc85b83 /cc/installer.go | |
parent | da4a7257b5b4c4fd41b8e8e084713e3e4f20187b (diff) | |
download | android_build_soong-8effde47def8609b08be27f75d9f24f8b943e3ed.tar.gz android_build_soong-8effde47def8609b08be27f75d9f24f8b943e3ed.tar.bz2 android_build_soong-8effde47def8609b08be27f75d9f24f8b943e3ed.zip |
Install VNDK libs in /system instead of /vendor
If BOARD_VNDK_VERSION is set, and a module is set to
`vendor_available: true` it is installed in /system and /vendor.
However, if the module is a VNDK library, it must be
installed at `/system/${LIB}/vndk` instead of /vendor/${LIB}.
For those modules, need following to set.
vendor_available: true,
vndk: {
enabled: true,
support_system_process: true,
},
`support_system_process` is optional to define.
If it is defined to true, the module is regarded as vndk-sp.
link-type check for VNDK modules is added to make sure that VNDK
modules only link to other VNDK shared libraries or LL-NDKs.
move the ABI checks to VNDK from all of vendor_available.
Bug: 38304436
Test: attempt to compile with BOARD_VNDK_VERSION:=current
Test: Use `vendor_available_vndk: true` for VNDK modules and compile
with BOARD_VNDK_VERSION:=current
Change-Id: I409268e0b7f05a9d01697bf9f9f4726b5aac631f
Diffstat (limited to 'cc/installer.go')
-rw-r--r-- | cc/installer.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cc/installer.go b/cc/installer.go index 112a7ea6..7bedc564 100644 --- a/cc/installer.go +++ b/cc/installer.go @@ -48,6 +48,7 @@ type baseInstaller struct { dir string dir64 string + subDir string relative string location installLocation @@ -61,17 +62,17 @@ func (installer *baseInstaller) installerProps() []interface{} { } func (installer *baseInstaller) installDir(ctx ModuleContext) android.OutputPath { - subDir := installer.dir + dir := installer.dir if ctx.toolchain().Is64Bit() && installer.dir64 != "" { - subDir = installer.dir64 + dir = installer.dir64 } if !ctx.Host() && !ctx.Arch().Native { - subDir = filepath.Join(subDir, ctx.Arch().ArchType.String()) + dir = filepath.Join(dir, ctx.Arch().ArchType.String()) } if installer.location == InstallInData && ctx.vndk() { - subDir = filepath.Join(subDir, "vendor") + dir = filepath.Join(dir, "vendor") } - return android.PathForModuleInstall(ctx, subDir, installer.Properties.Relative_install_path, installer.relative) + return android.PathForModuleInstall(ctx, dir, installer.subDir, installer.Properties.Relative_install_path, installer.relative) } func (installer *baseInstaller) install(ctx ModuleContext, file android.Path) { |