Merge "Use ctx.Target().NativeBridge to detect if the arch is translated or not"
am: f378a85523
Change-Id: I1d2fb8391f9339e0f27dce606b67ca0c192c8e5e
This commit is contained in:
commit
6374a89990
10
apex/apex.go
10
apex/apex.go
|
@ -656,7 +656,7 @@ func getCopyManifestForNativeLibrary(cc *cc.Module, handleSpecialLibs bool) (fil
|
|||
dirInApex = "lib64"
|
||||
}
|
||||
dirInApex = filepath.Join(dirInApex, cc.RelativeInstallPath())
|
||||
if !cc.Arch().Native {
|
||||
if cc.Target().NativeBridge == android.NativeBridgeEnabled || !cc.Arch().Native {
|
||||
dirInApex = filepath.Join(dirInApex, cc.Arch().ArchType.String())
|
||||
}
|
||||
if handleSpecialLibs {
|
||||
|
@ -681,6 +681,9 @@ func getCopyManifestForNativeLibrary(cc *cc.Module, handleSpecialLibs bool) (fil
|
|||
|
||||
func getCopyManifestForExecutable(cc *cc.Module) (fileToCopy android.Path, dirInApex string) {
|
||||
dirInApex = filepath.Join("bin", cc.RelativeInstallPath())
|
||||
if cc.Target().NativeBridge == android.NativeBridgeEnabled || !cc.Arch().Native {
|
||||
dirInApex = filepath.Join(dirInApex, cc.Arch().ArchType.String())
|
||||
}
|
||||
fileToCopy = cc.OutputFile().Path()
|
||||
return
|
||||
}
|
||||
|
@ -780,11 +783,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
}
|
||||
case executableTag:
|
||||
if cc, ok := child.(*cc.Module); ok {
|
||||
if !cc.Arch().Native {
|
||||
// There is only one 'bin' directory so we shouldn't bother copying in
|
||||
// native-bridge'd binaries and only use main ones.
|
||||
return true
|
||||
}
|
||||
fileToCopy, dirInApex := getCopyManifestForExecutable(cc)
|
||||
filesInfo = append(filesInfo, apexFile{fileToCopy, depName, dirInApex, nativeExecutable, cc, cc.Symlinks()})
|
||||
return true
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -952,7 +952,8 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
|
|||
// Bionic libraries (e.g. libc.so) 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()) && !library.buildStubs() && ctx.Arch().Native && !ctx.inRecovery() {
|
||||
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled || !ctx.Arch().Native
|
||||
if installToBootstrap(ctx.baseModuleName(), ctx.Config()) && !library.buildStubs() && !translatedArch && !ctx.inRecovery() {
|
||||
if ctx.Device() && isBionic(ctx.baseModuleName()) {
|
||||
library.installSymlinkToRuntimeApex(ctx, file)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue