diff --git a/vndk/tools/header-checker/utils/create_reference_dumps.py b/vndk/tools/header-checker/utils/create_reference_dumps.py index cbd8b47aa..d89300f1c 100755 --- a/vndk/tools/header-checker/utils/create_reference_dumps.py +++ b/vndk/tools/header-checker/utils/create_reference_dumps.py @@ -39,9 +39,9 @@ def make_libs_for_product(libs, product, variant, targets): def get_ref_dump_dir_stem(ref_dump_dir, category, chosen_vndk_version, - binder_bitness, arch_cpu): + binder_bitness, arch): return os.path.join(ref_dump_dir, category, chosen_vndk_version, - binder_bitness, arch_cpu) + binder_bitness, arch) def find_and_remove_path(root_path, file_name=None): @@ -66,7 +66,7 @@ def remove_references_for_all_arches_and_variants(ref_dump_dir, for category in ('ndk', 'platform', 'vndk'): dir_to_remove = get_ref_dump_dir_stem( ref_dump_dir, category, chosen_vndk_version, binder_bitness, - target.get_arch_cpu_str()) + target.get_arch_str()) if libs: for lib in libs: find_and_remove_path(dir_to_remove, @@ -96,7 +96,7 @@ def find_and_copy_lib_lsdumps(ref_dump_dir, chosen_vndk_version, for tag, path in arch_lsdump_paths: ref_dump_dir_stem = get_ref_dump_dir_stem( ref_dump_dir, tag_to_dir_name(tag), chosen_vndk_version, - binder_bitness, target.get_arch_cpu_str()) + binder_bitness, target.get_arch_str()) copy_reference_dump( path, os.path.join(ref_dump_dir_stem, 'source-based'), compress) num_created += 1 diff --git a/vndk/tools/header-checker/utils/utils.py b/vndk/tools/header-checker/utils/utils.py index 9b0df7dec..3046ba848 100644 --- a/vndk/tools/header-checker/utils/utils.py +++ b/vndk/tools/header-checker/utils/utils.py @@ -55,24 +55,29 @@ class Target(object): self.arch_variant = build_vars[2] self.cpu_variant = build_vars[3] - def get_arch_cpu_str(self): - """Return a string that represents the architecture, the architecture - variant, and the CPU variant. + def get_arch_str(self): + """Return a string that represents the architecture and the + architecture variant. If TARGET_ARCH == TARGET_ARCH_VARIANT, soong makes targetArchVariant - empty. This is the case for aosp_x86_64 and aosp_x86_ab. + empty. This is the case for aosp_x86_64. """ if not self.arch_variant or self.arch_variant == self.arch: arch_variant = '' else: 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': cpu_variant = '' else: cpu_variant = '_' + self.cpu_variant - return self.arch + arch_variant + cpu_variant + return self.get_arch_str() + cpu_variant def get_module_variant_dir_name(self, variant_suffix): """Create module variant directory name from the architecture, the