Enable the Cross-Version ABI diff configuration so developers can
specify different flags for current and previous version ABI Check. The
-target-version flag were added to determine the config section to be
selected. The details of this configuration logic could be found in
go/cross-version-abi-diff-configuration.
Test: preform abi diff with config.json
Bug: 239792343
Change-Id: I8fdad2d18096cfa7866183ecc2d7826682c85eb6
Since Cross-Version ABI Check is introduced, the flags could be
different when diffing with previous or current dumps. The structure and
format of the newly proposed config are changed so users can configure
flags for different diff targets. This CL changes the config format from
.ini to .json with the same features the format of the json is described
in go/cross-version-abi-diff-configuration.
Test: preform abi diff with config.json
Bug: 239792343
Change-Id: I731bafbfdacd2a780c5f7a27997893cecb2eb1f3
The module is a host python binary with embedded launcher. It is
independent of the python runtime installed on the OS.
Test: m create_reference_dumps && \
create_reference_dumps -products aosp_x86_64 -libs libc
Bug: 238984913
Change-Id: Ie84ef5c78cec978f83a2bddb370978fb962de4bd
* changes:
Refactor GetRefDumpDirStem to avoid excessive arguments passing
Generate dumps for non-VNDK into folder that matches Cross-Version ABI Check mechanism
Generate LLNDK ABI dumps to platform/ instead of vndk/
The arguments required by function get_ref_dump_dir_stem() would be
carried all the way to get_ref_dump_dir_stem(). In this CL, the logic
of get_ref_dump_dir_stem() would be wrapped into a class so that the
other functions can be cleaner.
Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py --llndk -l libvndksupport -l libbinder_ndk -l libprocinfo
Bug: 238828401
Change-Id: If1ccc3d9de0408c5e1ef252412630df341d38e14
The dumps of non-VNDK was generated to PLATFORM_SDK_VERSION. To enable
the Cross-Version ABI Check, before finalization (when
PLATFORM_VERSION_CODENAME is not REL), dumps should be generate to
current/ no matter what PLATFORM_SDK_VERSION is; After finalization,
dumps should be generate to PLATFORM_SDK_VERSION/.
Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py \
--llndk -l libvndksupport -l libbinder_ndk -l libprocinfo
Bug: 238573414
Change-Id: I198bf3e1fb1382a9378dcde16deb9262f0eb9f64
Since vndk libraries don't need to maintain Cross-Version abi
compatibility. The newly proposed Cross-Version ABi checking mechanism
is applied to only ndk/ and platform/. The dumps of LLNDK libraries
should be generated to platform/ to be benefited from this checking
mechanism.
Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py \
--llndk -l libvndksupport
Bug: 238383972
Change-Id: I0d903c16eecfd57001a539c14bd4d6945c148e3c
This commit configures "has_reference_dump" for the modules in ABI unit
tests. gen_all.py refers to the flag to creates reference dumps.
Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
development/vndk/tools/header-checker/tests/gen_all.py
Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
development/vndk/tools/header-checker/tests/test.py
Bug: 237966264
Change-Id: I35d5c43a20533cc71470b02919258dd883b40241
The purpose of the option was to parse individual header files. It's not
an effective solution to the headers that are not self-contained.
Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
development/vndk/tools/header-checker/tests/test.py
Bug: 237966264
Change-Id: Id7321d7feb0bb28f6e0da39bc9d6a4348e038149
If the contents of lsdump_paths.txt was corrupted,
create_reference_dumps.py might not rebuild lsdump_paths.txt due to
incremental build mechanism. Manually unlink and rebuild
lsdump_paths.txt in create_reference_dumps.py so that it always get the
up-to-date lsdump_paths.txt.
Bug: 233562033
Test: $ development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libbinder -product aosp_arm64
$ echo "" > $ANDROID_PRODUCT_OUT/lsdump_paths.txt
$ development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libbinder -product aosp_arm64
Change-Id: Iedccba6ffb659b3348c4f3fb57b82e38de8e53c3
It's possible that a developer would set SKIP_ABI_CHECKS during
development, and only execute create_reference_dumps.py before
submitting the change. If the developer forgot to clear SKIP_ABI_CHECKS
before running create_reference_dumps.py, the developer would be hit by
a confusing error (something about lsdump_paths.txt has invalid format),
because some preconditions of create_reference_dumps.py aren't met.
The error message isn't helpful as it doesn't tell the developer how to
resolve the error.
Let's just unset SKIP_ABI_CHECKS in create_reference_dumps.py, so
create_reference_dumps.py can be as fool-proof as possible.
The developer doesn't need to know the preconditions of
create_reference_dumps.py as it should handle it by itself.
Bug: 233562033
Test: export SKIP_ABI_CHECKS=true && ./create_reference_dumps.py
Change-Id: I397f1fcad7f0a1f9a7cb2781f32d85cdf2439e60
The build system finds the ABI dumps in the directories named
<TARGET_ARCH> and <TARGET_2ND_ARCH>_<TARGET_ARCH>. The ABI of the
non-generic arch variants are compared with the dumps.
Bug: 213127415
Test: ./create_reference_dumps.py
Change-Id: I3924092a75e2b9b68f5f60ece86a9d46537384f9
Push specific licenses down the tree toward the leaf directories.
Remove extra Apache 2.0 license texts--just use Android-Apache-2.0
Test: m nothing
Change-Id: Ibee25f75f5933699d6f43acdc192b2ada6823757
Bug: http://b/150809112
This is a new upstream library that exports both the clang and LLVM C++
symbols and can replace libLLVM and (android-toolchain-only)
libclang_cxx.so.
Test: Build and run header-* tools
Change-Id: Ibb8ae24e758c4c492c18e1192be9d57ef05b78df
--skip-make is deprecated because of its odd behavior around the
out/.soong.kati_enabled file. Replace it with --skip-config --soong-only
instead, which will unambigiously skip running kati.
Bug: 204136549
Test: None, development/vndk/tools/header-checker/android/build-prebuilts.sh already broken
Change-Id: Ibdc052f86fa177304e53247e69371933b618180e
This commit extends the format of --root-dir to <path>:<replacement>. If
a source path starts with <path>, the prefix is replaced. The build
system can use this option to have the ABI tools replace non-default
OUT_DIR with "out". This commit also allows more than one --root-dir.
When the tool normalizes a source path, the tool finds the longest
matching root dir.
Test: ./header-checker-unittests
Bug: 192157880
Change-Id: Ie77b4f09304e029aa5c2acc6a000c59400913426
Sometimes these files are absent but this causes the script to fail since
it's run with `-e`. Ignore failures when deleting .fetch*.
Test: run script
Change-Id: Ida750b504064f2da53d0d9444838a49e476530d4