aboutsummaryrefslogtreecommitdiffstats
path: root/cc/binary.go
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2019-01-18 14:37:31 -0800
committerAlex Light <allight@google.com>2019-01-29 03:21:47 +0000
commit3d67359f2f0eee9da739a7f96ae9888116e09079 (patch)
tree2d8f7ae5e9c3526b4e15a9b20ad495c4fd709087 /cc/binary.go
parent62f6fcbbb9528b58fd98e5fd5c71e484844be12f (diff)
downloadbuild_soong-3d67359f2f0eee9da739a7f96ae9888116e09079.tar.gz
build_soong-3d67359f2f0eee9da739a7f96ae9888116e09079.tar.bz2
build_soong-3d67359f2f0eee9da739a7f96ae9888116e09079.zip
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
Diffstat (limited to 'cc/binary.go')
-rw-r--r--cc/binary.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/cc/binary.go b/cc/binary.go
index 65e8eb52..4c863712 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -382,11 +382,8 @@ func (binary *binaryDecorator) link(ctx ModuleContext,
objs.coverageFiles = append(objs.coverageFiles, deps.WholeStaticLibObjs.coverageFiles...)
binary.coverageOutputFile = TransformCoverageFilesToLib(ctx, objs, builderFlags, binary.getStem(ctx))
- return ret
-}
-
-func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
- binary.baseInstaller.install(ctx, file)
+ // Need to determine symlinks early since some targets (ie APEX) need this
+ // information but will not call 'install'
for _, symlink := range binary.Properties.Symlinks {
binary.symlinks = append(binary.symlinks,
symlink+String(binary.Properties.Suffix)+ctx.toolchain().ExecutableSuffix())
@@ -401,6 +398,15 @@ func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
}
}
+ return ret
+}
+
+func (binary *binaryDecorator) symlinkList() []string {
+ return binary.symlinks
+}
+
+func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
+ binary.baseInstaller.install(ctx, file)
for _, symlink := range binary.symlinks {
ctx.InstallSymlink(binary.baseInstaller.installDir(ctx), symlink, binary.baseInstaller.path)
}