Add --llndk to create_reference_dumps.py for llndk libraries.
Currently, we do abi checks on the system variants of llndk libraries.
Therefore, add an 'llndk' flag to specify that the system variant should be
built.
Bug: 77101345
Test: utils/create_reference_dumps.py --llndk -l libdl produces
libdl references.
Merged-In: Id4c607674f096daf041520d4a1ca43199d4451da
Change-Id: Id4c607674f096daf041520d4a1ca43199d4451da
(cherry picked from commit cd0e8aff22)
This commit is contained in:
@@ -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`.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user