summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHsin-Yi Chen <hsinyichen@google.com>2024-01-04 14:27:46 +0800
committerHsin-Yi Chen <hsinyichen@google.com>2024-02-02 15:12:12 +0800
commit7ccc1b590e99cf7aa7816fd2dabd4674b265da82 (patch)
tree793517ce9a4c25a948cb7719bbd43ab6e7b322ff
parent443c89032391fe32f4c94af5e0650783c16251f8 (diff)
downloaddevelopment-7ccc1b590e99cf7aa7816fd2dabd4674b265da82.tar.gz
Generate LLNDK ABI dumps in prebuilts/abi-dumps/vndk
create_reference_dumps.py generates LLNDK dumps in prebuilts/abi-dumps/vndk/<RELEASE_BOARD_API_LEVEL>. Test: ./create_reference_dumps.py -products aosp_x86_64 -release next Bug: 314010764 Change-Id: I96be20c09fd63d2a5bf4a21483c812f32415d56a
-rwxr-xr-xvndk/tools/header-checker/utils/create_reference_dumps.py24
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