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
This commit is contained in:
Jayant Chowdhary
2018-03-08 10:56:37 -08:00
parent 4ea2b0a8ff
commit 5ab281f313

View File

@@ -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...')