Merge "Remove arch variants from ABI dump directory names"
This commit is contained in:
@@ -56,13 +56,9 @@ def find_and_remove_path(root_path, file_name=None):
|
|||||||
shutil.rmtree(root_path)
|
shutil.rmtree(root_path)
|
||||||
|
|
||||||
|
|
||||||
def remove_references_for_all_arches_and_variants(ref_dump_dir,
|
def remove_references_for_all_arches(ref_dump_dir, chosen_vndk_version,
|
||||||
chosen_vndk_version,
|
binder_bitness, targets, libs):
|
||||||
binder_bitness, targets,
|
|
||||||
libs):
|
|
||||||
for target in targets:
|
for target in targets:
|
||||||
if target.arch == '' or target.arch_variant == '':
|
|
||||||
continue
|
|
||||||
for category in ('ndk', 'platform', 'vndk'):
|
for category in ('ndk', 'platform', 'vndk'):
|
||||||
dir_to_remove = get_ref_dump_dir_stem(
|
dir_to_remove = get_ref_dump_dir_stem(
|
||||||
ref_dump_dir, category, chosen_vndk_version, binder_bitness,
|
ref_dump_dir, category, chosen_vndk_version, binder_bitness,
|
||||||
@@ -107,12 +103,9 @@ def create_source_abi_reference_dumps(args, chosen_vndk_version,
|
|||||||
binder_bitness, lsdump_paths, targets):
|
binder_bitness, lsdump_paths, targets):
|
||||||
num_libs_copied = 0
|
num_libs_copied = 0
|
||||||
for target in targets:
|
for target in targets:
|
||||||
if target.arch == '' or target.arch_variant == '':
|
|
||||||
continue
|
|
||||||
|
|
||||||
print('Creating dumps for target_arch:', target.arch, 'and variant ',
|
|
||||||
target.arch_variant)
|
|
||||||
assert target.primary_arch != ''
|
assert target.primary_arch != ''
|
||||||
|
print(f'Creating dumps for arch: {target.arch}, '
|
||||||
|
f'primary arch: {target.primary_arch}')
|
||||||
|
|
||||||
num_libs_copied += find_and_copy_lib_lsdumps(
|
num_libs_copied += find_and_copy_lib_lsdumps(
|
||||||
args.ref_dump_dir, chosen_vndk_version, binder_bitness, target,
|
args.ref_dump_dir, chosen_vndk_version, binder_bitness, target,
|
||||||
@@ -140,11 +133,12 @@ def create_source_abi_reference_dumps_for_all_products(args):
|
|||||||
chosen_vndk_version = choose_vndk_version(
|
chosen_vndk_version = choose_vndk_version(
|
||||||
args.version, platform_vndk_version, board_vndk_version)
|
args.version, platform_vndk_version, board_vndk_version)
|
||||||
|
|
||||||
targets = [Target(True, product), Target(False, product)]
|
targets = [t for t in (Target(True, product), Target(False, product))
|
||||||
|
if t.arch]
|
||||||
# Remove reference ABI dumps specified in `args.libs` (or remove all of
|
# Remove reference ABI dumps specified in `args.libs` (or remove all of
|
||||||
# them if none of them are specified) so that we may build these
|
# them if none of them are specified) so that we may build these
|
||||||
# libraries successfully.
|
# libraries successfully.
|
||||||
remove_references_for_all_arches_and_variants(
|
remove_references_for_all_arches(
|
||||||
args.ref_dump_dir, chosen_vndk_version, binder_bitness, targets,
|
args.ref_dump_dir, chosen_vndk_version, binder_bitness, targets,
|
||||||
args.libs)
|
args.libs)
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,16 @@ class Target(object):
|
|||||||
self.cpu_variant = build_vars[3]
|
self.cpu_variant = build_vars[3]
|
||||||
|
|
||||||
def get_arch_str(self):
|
def get_arch_str(self):
|
||||||
"""Return a string that represents the architecture and the
|
"""Return a string that represents the architecture and the primary
|
||||||
architecture variant.
|
architecture.
|
||||||
|
"""
|
||||||
|
if not self.arch or self.arch == self.primary_arch:
|
||||||
|
return self.primary_arch
|
||||||
|
return self.arch + '_' + self.primary_arch
|
||||||
|
|
||||||
|
def get_arch_cpu_str(self):
|
||||||
|
"""Return a string that represents the architecture, the architecture
|
||||||
|
variant, and the CPU variant.
|
||||||
|
|
||||||
If TARGET_ARCH == TARGET_ARCH_VARIANT, soong makes targetArchVariant
|
If TARGET_ARCH == TARGET_ARCH_VARIANT, soong makes targetArchVariant
|
||||||
empty. This is the case for aosp_x86_64.
|
empty. This is the case for aosp_x86_64.
|
||||||
@@ -64,17 +72,12 @@ class Target(object):
|
|||||||
else:
|
else:
|
||||||
arch_variant = '_' + self.arch_variant
|
arch_variant = '_' + self.arch_variant
|
||||||
|
|
||||||
return self.arch + arch_variant
|
|
||||||
|
|
||||||
def get_arch_cpu_str(self):
|
|
||||||
"""Return a string that represents the architecture, the architecture
|
|
||||||
variant, and the CPU variant."""
|
|
||||||
if not self.cpu_variant or self.cpu_variant == 'generic':
|
if not self.cpu_variant or self.cpu_variant == 'generic':
|
||||||
cpu_variant = ''
|
cpu_variant = ''
|
||||||
else:
|
else:
|
||||||
cpu_variant = '_' + self.cpu_variant
|
cpu_variant = '_' + self.cpu_variant
|
||||||
|
|
||||||
return self.get_arch_str() + cpu_variant
|
return self.arch + arch_variant + cpu_variant
|
||||||
|
|
||||||
|
|
||||||
def _validate_dump_content(dump_path):
|
def _validate_dump_content(dump_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user