Add support for symlink_preferred_arch in apex

Some modules rely on symlink_preferred_arch to have expected files
present. This change makes apexs include these symlinks.

Test: m com.android.runtime.debug
      pushd $(mktemp -d)
      mkdir mnt
      unzip $OUT/apex/system/com.android.runtime.debug.apex
      sudo mount -o loop,ro apex_payload.img mnt
      Ensure that mnt/bin/dalvikvm and mnt/bin/dex2oatd both exist and
      are symlinks to mnt/bin/dalvikvm64 and mnt/bin/dex2oatd32
      respectively.

Bug: 119942078
Bug: 122373634
Bug: 123079311
Change-Id: I47868fbedc5bdd3141a836c488f79e91e0a6ddfe
This commit is contained in:
Alex Light
2019-01-18 14:37:31 -08:00
parent 62f6fcbbb9
commit 3d67359f2f
4 changed files with 87 additions and 23 deletions

View File

@@ -772,6 +772,15 @@ func (c *Module) Name() string {
return name
}
func (c *Module) Symlinks() []string {
if p, ok := c.installer.(interface {
symlinkList() []string
}); ok {
return p.symlinkList()
}
return nil
}
// orderDeps reorders dependencies into a list such that if module A depends on B, then
// A will precede B in the resultant list.
// This is convenient for passing into a linker.