diff options
author | Hsin-Yi Chen <hsinyichen@google.com> | 2024-02-17 03:08:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-02-17 03:08:34 +0000 |
commit | 2c9a6e2d2f1b0ddb25eb71b686bf233404050899 (patch) | |
tree | fe11f5ad4c50355fd48363d84d72b825333bf130 | |
parent | 42f592ef4f4343b042bdc26cc3c25356649611b2 (diff) | |
parent | 7ccc1b590e99cf7aa7816fd2dabd4674b265da82 (diff) | |
download | development-2c9a6e2d2f1b0ddb25eb71b686bf233404050899.tar.gz |
Merge "Generate LLNDK ABI dumps in prebuilts/abi-dumps/vndk" into main
-rwxr-xr-x | vndk/tools/header-checker/utils/create_reference_dumps.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/vndk/tools/header-checker/utils/create_reference_dumps.py b/vndk/tools/header-checker/utils/create_reference_dumps.py index 40ceba745..901970e97 100755 --- a/vndk/tools/header-checker/utils/create_reference_dumps.py +++ b/vndk/tools/header-checker/utils/create_reference_dumps.py @@ -13,7 +13,7 @@ from utils import ( PRODUCTS_DEFAULT = ['aosp_arm', 'aosp_arm64', 'aosp_x86', 'aosp_x86_64'] PREBUILTS_ABI_DUMPS_DIR = os.path.join(AOSP_DIR, 'prebuilts', 'abi-dumps') -PREBUILTS_ABI_DUMPS_SUBDIRS = ('ndk', 'platform') +PREBUILTS_ABI_DUMPS_SUBDIRS = ('ndk', 'platform', 'vndk') NON_AOSP_TAGS = {'VENDOR', 'PRODUCT'} SOONG_DIR = os.path.join(AOSP_DIR, 'out', 'soong', '.intermediates') @@ -28,8 +28,9 @@ class GetRefDumpDirStem: class GetVersionedRefDumpDirStem: - def __init__(self, chosen_platform_version, + def __init__(self, board_api_level, chosen_platform_version, binder_bitness): + self.board_api_level = board_api_level self.chosen_platform_version = chosen_platform_version self.binder_bitness = binder_bitness @@ -37,8 +38,9 @@ class GetVersionedRefDumpDirStem: if subdir not in PREBUILTS_ABI_DUMPS_SUBDIRS: raise ValueError(f'"{subdir}" is not a valid dump directory under ' f'{PREBUILTS_ABI_DUMPS_DIR}.') - return os.path.join(PREBUILTS_ABI_DUMPS_DIR, subdir, - self.chosen_platform_version, + version_stem = (self.board_api_level if subdir == 'vndk' else + self.chosen_platform_version) + return os.path.join(PREBUILTS_ABI_DUMPS_DIR, subdir, version_stem, self.binder_bitness, arch_str) @@ -56,8 +58,10 @@ def tag_to_dir_name(tag): return '' if tag == 'NDK': return 'ndk' - if tag in ('PLATFORM', 'LLNDK'): + if tag == 'PLATFORM': return 'platform' + if tag == 'LLNDK': + return 'vndk' raise ValueError(tag + ' is not a known tag.') @@ -94,10 +98,10 @@ def create_source_abi_reference_dumps_for_all_products(args): for product in args.products: build_target = BuildTarget(product, args.release, args.build_variant) ( - platform_vndk_version, binder_32_bit, - platform_version_codename, platform_sdk_version - ) = build_vars = get_build_vars( - ['PLATFORM_VNDK_VERSION', 'BINDER32BIT', + platform_vndk_version, release_board_api_level, binder_32_bit, + platform_version_codename, platform_sdk_version, + ) = get_build_vars( + ['PLATFORM_VNDK_VERSION', 'RELEASE_BOARD_API_LEVEL', 'BINDER32BIT', 'PLATFORM_VERSION_CODENAME', 'PLATFORM_SDK_VERSION'], build_target ) @@ -121,7 +125,7 @@ def create_source_abi_reference_dumps_for_all_products(args): exclude_tags = () else: get_ref_dump_dir_stem = GetVersionedRefDumpDirStem( - chosen_platform_version, + release_board_api_level, chosen_platform_version, binder_bitness) exclude_tags = NON_AOSP_TAGS |