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
This commit is contained in:
@@ -124,6 +124,9 @@ func (binary *binaryLinker) AndroidMk(ctx AndroidMkContext, ret *android.Android
|
||||
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
|
||||
fmt.Fprintln(w, "LOCAL_CXX_STL := none")
|
||||
fmt.Fprintln(w, "LOCAL_SYSTEM_SHARED_LIBRARIES :=")
|
||||
if binary.static() {
|
||||
fmt.Fprintln(w, "LOCAL_FORCE_STATIC_EXECUTABLE := true")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
@@ -173,6 +176,9 @@ func (installer *baseInstaller) AndroidMk(ctx AndroidMkContext, ret *android.And
|
||||
stem := strings.TrimSuffix(file, filepath.Ext(file))
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Clean(dir))
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
|
||||
if len(installer.Properties.Symlinks) > 0 {
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_SYMLINKS := "+strings.Join(installer.Properties.Symlinks, " "))
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user