• Tibor Goldschwendt's avatar
    Add lib placeholders when packaging modules to make bundle multi ABI · a9dcd64a
    Tibor Goldschwendt authored
    This fixes a bug where modules can miss an ABI and fail the bundle
    packaging step. This is due to two factors:
    
    1. crrev.com/c/1876975 added an allotment step to each bundle that
       determined in which module native libs are packaged into. If a module
       only depends on libs that are also depended on by other modules this
       module will package no libs even though libs are specified when
       instantiating the module target.
    
    2. Bundletool requires that all modules support the same set of ABIs.
       To make modules appear to support the WebView ABI for Monochrome and
       Trichrome we add placeholder libs for the WebView ABI. We do this in
       the chrome_feature_module template if we specify real libs for the
       browser ABI.
    
    Given 1. and 2. it can happen that a module is only left with the
    placeholder lib and appear single ABI, failing packaging. This CL fixes
    that by telling the packaging step that the module should be multi ABI
    and the packaging step will add a placeholder lib if necessary. This
    makes placeholder logic in chrome_feature_module obsolete and therefore
    it is removed.
    
    This new multi ABI logic can likely be reused for other APKs that use
    lib placeholders simply to make the APK multi ABI.
    
    Bug: 870055
    Change-Id: I25cf4edd56bf253cff2aef54d1857cbe9167cae3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881814
    Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
    Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
    Reviewed-by: default avatarChristopher Grant <cjgrant@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#710204}
    a9dcd64a
apkbuilder.py 16.2 KB