diff --git a/vndk/tools/header-checker/README.md b/vndk/tools/header-checker/README.md index 5a57d7721..47f9a9266 100644 --- a/vndk/tools/header-checker/README.md +++ b/vndk/tools/header-checker/README.md @@ -83,6 +83,8 @@ For more command line options, run `header-abi-diff --help`. `utils/create_reference_dumps.py` may be used to create reference ABI dumps. +#For VNDK libraries + For example, the command below creates reference ABI dumps for all VNDK shared libraries on arm, arm64, x86, and x86_64 architectures: @@ -96,7 +98,16 @@ To create reference ABI dumps for a specific library, run the command below: $ python3 create_reference_dumps.py -l libfoo ``` -This will create reference dumps for `libfoo`, assuming `libfoo` is a VNDK or -LLNDK library. +This will create reference dumps for `libfoo`, assuming `libfoo` is a VNDK +library. + +# For LLNDK libraries + +``` +$ python3 create_reference_dumps.py -l libfoo --llndk +``` +This will create reference dumps for `libfoo`, assuming `libfoo` is an LLNDK +library. + For more command line options, run `utils/create_reference_dumps.py --help`. diff --git a/vndk/tools/header-checker/utils/create_reference_dumps.py b/vndk/tools/header-checker/utils/create_reference_dumps.py index 5c28ca7bd..bb5adffc3 100755 --- a/vndk/tools/header-checker/utils/create_reference_dumps.py +++ b/vndk/tools/header-checker/utils/create_reference_dumps.py @@ -84,12 +84,12 @@ def get_ref_dump_dir_stem(args, vndk_or_ndk, product, chosen_vndk_version): return ref_dump_dir_stem -def make_libs_for_all_arches_and_variants(libs): +def make_libs_for_all_arches_and_variants(libs, llndk_mode): for product in PRODUCTS: get_lsdump_paths_file(product) if libs: print('making libs for product:', product) - make_libraries(libs, product) + make_libraries(libs, product, llndk_mode) else: print('making all libs for product: ', product) make_tree(product) @@ -154,6 +154,8 @@ def main(): parser.add_argument('--version', help='VNDK version') parser.add_argument('--no-make-lib', help='no m -j lib.vendor while \ creating reference', default=False, action='store_true') + parser.add_argument('--llndk', help='The libs specified by -l are llndk', + default=False, action='store_true') parser.add_argument('-libs', help='libs to create references for', action='append') parser.add_argument('-ref-dump-dir', @@ -174,7 +176,7 @@ def main(): remove_references_for_all_arches_and_variants(args, chosen_vndk_version) # make all the libs specified / the entire vndk_package if none specified if (args.no_make_lib == False): - make_libs_for_all_arches_and_variants(args.libs) + make_libs_for_all_arches_and_variants(args.libs, args.llndk) for product in PRODUCTS: num_processed += create_source_abi_reference_dumps( soong_dir, args, product, chosen_vndk_version) diff --git a/vndk/tools/header-checker/utils/utils.py b/vndk/tools/header-checker/utils/utils.py index 4ae28634f..de8414dfc 100644 --- a/vndk/tools/header-checker/utils/utils.py +++ b/vndk/tools/header-checker/utils/utils.py @@ -136,12 +136,13 @@ def make_targets(targets, product): subprocess.check_call(make_cmd, cwd=AOSP_DIR, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) -def make_libraries(libs, product): +def make_libraries(libs, product, llndk_mode): # To aid creation of reference dumps. Makes lib.vendor for the current # configuration. lib_targets = [] for lib in libs: - lib_targets.append(lib + VENDOR_SUFFIX) + lib = lib if llndk_mode else lib + VENDOR_SUFFIX + lib_targets.append(lib) make_targets(lib_targets, product) def find_lib_lsdumps(target_arch, target_arch_variant,