From 5ab281f3136d7fcca04b9da8aa9e0305d034f1e5 Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Thu, 8 Mar 2018 10:56:37 -0800 Subject: [PATCH] Use binder bitness instead of primary arch for references root. Binder bitness does not always directly relate to primary arch as thought before. For eg: a target with primary arch 'arm' could be using 64 bit binder. Bug: 74362434 Test: utils/create_reference_dumps.py Change-Id: I1c1214b538e67247c666307d1360e4260239e4e1 --- .../header-checker/utils/create_reference_dumps.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vndk/tools/header-checker/utils/create_reference_dumps.py b/vndk/tools/header-checker/utils/create_reference_dumps.py index bfa354f9e..5b65921f9 100755 --- a/vndk/tools/header-checker/utils/create_reference_dumps.py +++ b/vndk/tools/header-checker/utils/create_reference_dumps.py @@ -69,11 +69,12 @@ def get_ref_dump_dir_stem(args, vndk_or_ndk, product, platform_vndk_version): version = platform_vndk_version if version != '' and version[0].isdigit() == False : version = 'current' - primary_arch =\ - get_build_vars_for_product(['TARGET_ARCH'], product)[0] + binder_bitness = '64' + if get_build_vars_for_product(['BINDER32BIT'], product)[0] == 'true': + binder_bitness = '32' ref_dump_dir_stem = os.path.join(args.ref_dump_dir, vndk_or_ndk) ref_dump_dir_stem = os.path.join(ref_dump_dir_stem, version) - ref_dump_dir_stem = os.path.join(ref_dump_dir_stem, primary_arch) + ref_dump_dir_stem = os.path.join(ref_dump_dir_stem, binder_bitness) return ref_dump_dir_stem @@ -94,8 +95,8 @@ def find_and_remove_path(root_path, file_name=None): ' -exec rm -rf {} \;' subprocess.check_call(remove_cmd_str, cwd=AOSP_DIR, shell=True) else: - remove_cmd_str = 'rm -rf ' + root_path - subprocess.check_call(remove_cmd_str, cwd=AOSP_DIR, shell=True) + remove_cmd_str = 'rm -rf *' + subprocess.check_call(remove_cmd_str, cwd=root_path, shell=True) def remove_references_for_all_arches_and_variants(args): print('Removing reference dumps...')