Move apex module installation into Soong
Move apex module installation rules into Soong by overriding InstallBypassMake. Soong installs don't support post install commands, so move the symlinks into separate rules and add dependencies on them. This relands If65d283abc86f18ad266da0bf16fe95971a0bf9c with fixes to install files into $OUT/apex and I606286e971b55d9d1fc4dcd0fbd476962de5fa79 with a fix for reversed logic. Bug: 204136549 Test: m checkbuild Change-Id: Ie65c53ebc7911efacdb8e11ba49059448f03c658
This commit is contained in:
20
apex/apex.go
20
apex/apex.go
@@ -409,14 +409,14 @@ type apexBundle struct {
|
||||
// vendor/google/build/build_unbundled_mainline_module.sh for more detail.
|
||||
bundleModuleFile android.WritablePath
|
||||
|
||||
// Target path to install this APEX. Usually out/target/product/<device>/<partition>/apex.
|
||||
// Target directory to install this APEX. Usually out/target/product/<device>/<partition>/apex.
|
||||
installDir android.InstallPath
|
||||
|
||||
// List of commands to create symlinks for backward compatibility. These commands will be
|
||||
// attached as LOCAL_POST_INSTALL_CMD to apex package itself (for unflattened build) or
|
||||
// apex_manifest (for flattened build) so that compat symlinks are always installed
|
||||
// regardless of TARGET_FLATTEN_APEX setting.
|
||||
compatSymlinks []string
|
||||
// Path where this APEX was installed.
|
||||
installedFile android.InstallPath
|
||||
|
||||
// Installed locations of symlinks for backward compatibility.
|
||||
compatSymlinks android.InstallPaths
|
||||
|
||||
// Text file having the list of individual files that are included in this APEX. Used for
|
||||
// debugging purpose.
|
||||
@@ -442,6 +442,10 @@ type apexBundle struct {
|
||||
modulePaths []string
|
||||
}
|
||||
|
||||
func (*apexBundle) InstallBypassMake() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// apexFileClass represents a type of file that can be included in APEX.
|
||||
type apexFileClass int
|
||||
|
||||
@@ -2097,7 +2101,9 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
a.linkToSystemLib = false
|
||||
}
|
||||
|
||||
a.compatSymlinks = makeCompatSymlinks(a.BaseModuleName(), ctx)
|
||||
if a.properties.ApexType != zipApex {
|
||||
a.compatSymlinks = makeCompatSymlinks(a.BaseModuleName(), ctx, a.primaryApexType)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 4) generate the build rules to create the APEX. This is done in builder.go.
|
||||
|
Reference in New Issue
Block a user