зеркало из https://github.com/AvaloniaUI/angle.git
Default roll_aosp.sh to copy artifacts to vendor partition
... to support using ANGLE as a native GL driver. Note: this will not affect devices installing the APK with `PRODUCT_PACKAGES += ANGLE` and will *not* also install the libs to vendor. Bug: b/147316305 Bug: angleproject:5456 Test: ./scripts/roll_aosp.sh and build in AOSP Change-Id: I98cab8d0735a4f66293ac063e0eef2ae7ddbee7b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618529 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
This commit is contained in:
Родитель
2e9706d80d
Коммит
2c65da28a2
|
@ -312,7 +312,7 @@ def merge_bps(bps_for_abis):
|
|||
return common_bp
|
||||
|
||||
|
||||
def library_target_to_blueprint(target, build_info, copy_to_vendor, relative_install_path):
|
||||
def library_target_to_blueprint(target, build_info):
|
||||
bps_for_abis = {}
|
||||
blueprint_type = ""
|
||||
for abi in abi_targets:
|
||||
|
@ -339,11 +339,9 @@ def library_target_to_blueprint(target, build_info, copy_to_vendor, relative_ins
|
|||
|
||||
bp['sdk_version'] = sdk_version
|
||||
bp['stl'] = stl
|
||||
if copy_to_vendor:
|
||||
if target in root_targets:
|
||||
bp['vendor'] = True
|
||||
if relative_install_path is not None:
|
||||
assert copy_to_vendor
|
||||
bp['target'] = {'android': {'relative_install_path': relative_install_path}}
|
||||
bp['target'] = {'android': {'relative_install_path': 'egl'}}
|
||||
bps_for_abis[abi] = bp
|
||||
|
||||
common_bp = merge_bps(bps_for_abis)
|
||||
|
@ -446,14 +444,11 @@ def action_target_to_blueprint(target, build_info):
|
|||
return blueprint_type, bp
|
||||
|
||||
|
||||
def gn_target_to_blueprint(target, build_info, copy_to_vendor, relative_install_path):
|
||||
def gn_target_to_blueprint(target, build_info):
|
||||
for abi in abi_targets:
|
||||
gn_type = build_info[abi][target]['type']
|
||||
if gn_type in blueprint_library_target_types:
|
||||
if copy_to_vendor and gn_type == 'shared_library':
|
||||
return library_target_to_blueprint(target, build_info, True, relative_install_path)
|
||||
else:
|
||||
return library_target_to_blueprint(target, build_info, False, None)
|
||||
return library_target_to_blueprint(target, build_info)
|
||||
elif gn_type in blueprint_gen_types:
|
||||
return action_target_to_blueprint(target, build_info[abi])
|
||||
else:
|
||||
|
@ -489,13 +484,7 @@ def main():
|
|||
'gn_json_' + fixed_abi,
|
||||
help=fixed_abi +
|
||||
'gn desc in json format. Generated with \'gn desc <out_dir> --format=json "*"\'.')
|
||||
parser.add_argument(
|
||||
'--copy-to-vendor-partition',
|
||||
help='whether the shared library target will copy to the vendor partition',
|
||||
action='store_true',
|
||||
default=False)
|
||||
args = vars(parser.parse_args())
|
||||
copy_to_vendor = args['copy_to_vendor_partition']
|
||||
|
||||
build_info = {}
|
||||
for abi in abi_targets:
|
||||
|
@ -512,13 +501,7 @@ def main():
|
|||
|
||||
blueprint_targets = []
|
||||
for target in targets_to_write:
|
||||
blueprint_targets.append(
|
||||
gn_target_to_blueprint(
|
||||
target,
|
||||
build_info,
|
||||
copy_to_vendor,
|
||||
relative_install_path='egl' if copy_to_vendor and
|
||||
(target in root_targets) else None))
|
||||
blueprint_targets.append(gn_target_to_blueprint(target, build_info))
|
||||
|
||||
# Add APKs with all of the root libraries
|
||||
blueprint_targets.append(('filegroup', {
|
||||
|
|
|
@ -105,7 +105,7 @@ python scripts/generate_android_bp.py \
|
|||
${GN_OUTPUT_DIRECTORY}/desc.arm.json \
|
||||
${GN_OUTPUT_DIRECTORY}/desc.arm64.json \
|
||||
${GN_OUTPUT_DIRECTORY}/desc.x86.json \
|
||||
${GN_OUTPUT_DIRECTORY}/desc.x64.json $@ > Android.bp
|
||||
${GN_OUTPUT_DIRECTORY}/desc.x64.json > Android.bp
|
||||
|
||||
rm -rf ${GN_OUTPUT_DIRECTORY}
|
||||
git add Android.bp
|
||||
|
|
Загрузка…
Ссылка в новой задаче