Support relative_install_path for cc modules
Support specifying an install path relative to the default install
path for cc libraries and binaries.
Change-Id: I47a97de9beaedde27d99c498c3f26c9d36358d94
diff --git a/cc/cc.go b/cc/cc.go
index f634697..18e499d 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -211,6 +211,9 @@
// Minimum sdk version supported when compiling against the ndk
Sdk_version string
+
+ // relative_install_path: install to a subdirectory of the default install path for the module
+ Relative_install_path string
}
type unusedProperties struct {
@@ -1079,7 +1082,7 @@
installDir = "lib64"
}
- ctx.InstallFile(installDir, c.out)
+ ctx.InstallFile(filepath.Join(installDir, c.properties.Relative_install_path), c.out)
}
func (c *CCLibrary) installModule(ctx common.AndroidModuleContext, flags CCFlags) {
@@ -1280,7 +1283,7 @@
}
func (c *CCBinary) installModule(ctx common.AndroidModuleContext, flags CCFlags) {
- ctx.InstallFile("bin", c.out)
+ ctx.InstallFile(filepath.Join("bin", c.properties.Relative_install_path), c.out)
}
type ccTest struct {