Use ctx.Target().NativeBridge to detect if the arch is translated or not

Bug: 137015854
Test: m
Test: build cf_x86_phone and ensure there is no dangling symlink
/system/lib/arm/libm.so

Change-Id: I0f5efdb9e1f5e4e213ca4ebaa28ace0a130b36a6
This commit is contained in:
Jiyong Park
2019-07-09 16:19:16 +09:00
parent db7a770509
commit acbf6c76c6
3 changed files with 8 additions and 8 deletions

View File

@@ -444,7 +444,8 @@ func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
// Bionic binaries (e.g. linker) is installed to the bootstrap subdirectory.
// The original path becomes a symlink to the corresponding file in the
// runtime APEX.
if installToBootstrap(ctx.baseModuleName(), ctx.Config()) && ctx.Arch().Native && ctx.apexName() == "" && !ctx.inRecovery() {
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled || !ctx.Arch().Native
if installToBootstrap(ctx.baseModuleName(), ctx.Config()) && !translatedArch && ctx.apexName() == "" && !ctx.inRecovery() {
if ctx.Device() && isBionic(ctx.baseModuleName()) {
binary.installSymlinkToRuntimeApex(ctx, file)
}