Add symlink installation support
Allow modules to specify a list of names to create alias symlinks, and
pass the list to make so it can create them. Also pass
LOCAL_FORCE_STATIC_EXECUTABLE for static binaries so that make can avoid
a linker_asan -> linker -> linker_asan dependency loop.
Change-Id: I314d088095ac5f43641ed2cf8247c14c27e23b93
diff --git a/cc/cc.go b/cc/cc.go
index 4ff6572..f8723bb 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -454,6 +454,9 @@
type InstallerProperties struct {
// install to a subdirectory of the default install path for the module
Relative_install_path string
+
+ // install symlinks to the module
+ Symlinks []string `android:"arch_variant"`
}
type StripProperties struct {
@@ -1472,6 +1475,9 @@
}
dir := android.PathForModuleInstall(ctx, subDir, installer.Properties.Relative_install_path)
installer.path = ctx.InstallFile(dir, file)
+ for _, symlink := range installer.Properties.Symlinks {
+ ctx.InstallSymlink(dir, symlink, installer.path)
+ }
}
func (installer *baseInstaller) inData() bool {