Merge "LOCAL_REQUIRED_MODULES from apex has ":32" or ":64" suffix" am: d684e04247
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554988 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8b48d2e124f936c85339426d93e474be67c59856
This commit is contained in:
@@ -126,8 +126,18 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo
|
|||||||
|
|
||||||
moduleName := a.fullModuleName(apexBundleName, &fi)
|
moduleName := a.fullModuleName(apexBundleName, &fi)
|
||||||
|
|
||||||
if !android.InList(moduleName, moduleNames) {
|
// This name will be added to LOCAL_REQUIRED_MODULES of the APEX. We need to be
|
||||||
moduleNames = append(moduleNames, moduleName)
|
// arch-specific otherwise we will end up installing both ABIs even when only
|
||||||
|
// either of the ABI is requested.
|
||||||
|
aName := moduleName
|
||||||
|
switch fi.multilib {
|
||||||
|
case "lib32":
|
||||||
|
aName = aName + ":32"
|
||||||
|
case "lib64":
|
||||||
|
aName = aName + ":64"
|
||||||
|
}
|
||||||
|
if !android.InList(aName, moduleNames) {
|
||||||
|
moduleNames = append(moduleNames, aName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if linkToSystemLib {
|
if linkToSystemLib {
|
||||||
|
@@ -441,6 +441,8 @@ type apexFile struct {
|
|||||||
transitiveDep bool
|
transitiveDep bool
|
||||||
isJniLib bool
|
isJniLib bool
|
||||||
|
|
||||||
|
multilib string
|
||||||
|
|
||||||
// TODO(jiyong): remove this
|
// TODO(jiyong): remove this
|
||||||
module android.Module
|
module android.Module
|
||||||
}
|
}
|
||||||
@@ -460,6 +462,7 @@ func newApexFile(ctx android.BaseModuleContext, builtFile android.Path, androidM
|
|||||||
ret.requiredModuleNames = module.RequiredModuleNames()
|
ret.requiredModuleNames = module.RequiredModuleNames()
|
||||||
ret.targetRequiredModuleNames = module.TargetRequiredModuleNames()
|
ret.targetRequiredModuleNames = module.TargetRequiredModuleNames()
|
||||||
ret.hostRequiredModuleNames = module.HostRequiredModuleNames()
|
ret.hostRequiredModuleNames = module.HostRequiredModuleNames()
|
||||||
|
ret.multilib = module.Target().Arch.ArchType.Multilib
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
@@ -5680,7 +5680,7 @@ func TestSymlinksFromApexToSystemRequiredModuleNames(t *testing.T) {
|
|||||||
ensureNotContains(t, androidMk, "LOCAL_MODULE := prebuilt_myotherlib.myapex\n")
|
ensureNotContains(t, androidMk, "LOCAL_MODULE := prebuilt_myotherlib.myapex\n")
|
||||||
ensureNotContains(t, androidMk, "LOCAL_MODULE := myotherlib.myapex\n")
|
ensureNotContains(t, androidMk, "LOCAL_MODULE := myotherlib.myapex\n")
|
||||||
// `myapex` should have `myotherlib` in its required line, not `prebuilt_myotherlib`
|
// `myapex` should have `myotherlib` in its required line, not `prebuilt_myotherlib`
|
||||||
ensureContains(t, androidMk, "LOCAL_REQUIRED_MODULES += mylib.myapex myotherlib apex_manifest.pb.myapex apex_pubkey.myapex\n")
|
ensureContains(t, androidMk, "LOCAL_REQUIRED_MODULES += mylib.myapex:64 myotherlib:64 apex_manifest.pb.myapex apex_pubkey.myapex\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestApexWithJniLibs(t *testing.T) {
|
func TestApexWithJniLibs(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user