Commit Graph

8 Commits

Author SHA1 Message Date
Mu-Le Lee
2ce72d8673 Implement the Cross-Version ABI diff configuration
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
2022-08-19 04:42:03 +00:00
Mu-Le Lee
c2ebbbfec5 Change the format of header-abi-diff config from .ini to .json
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
2022-08-11 06:35:33 +00:00
Yi Kong
bf61605531 Switch to clang-r383902
This change also adapts to llvm::StringRef losing its implicit
conversion to std::string().

Test: ./build-prebuilts.sh
Change-Id: I32e2ca71fde4d39726a5061d641e933121e9bafe
2020-05-01 03:41:51 -07:00
Logan Chien
e527e061b8 header-checker: Downgrade to C++ 14
This commit switches the option to `-std=c++14` to avoid potential ODR
violations and fix the Mac build.

This commit downgrades from `-std=c++17` to `-std=c++14` because
"llvm/Support/RWMutex.h" from clang-r370808 will use `std::shared_mutex`
when `-std=c++17` is specified but LLVM/Clang prebuilts are built with a
different implementation.

Furthermore, Mac OS X 10.8 (or 10.9) does not support
`std::shared_mutex`.  Thus, there are availability errors when we are
building header-checker for Mac OS X:

    clang-r370808/include/llvm/Support/RWMutex.h:98:8:
    error: 'shared_mutex' is unavailable: introduced in macOS 10.12

Bug: 139945549
Test: OUT_DIR=out && \
      development/vndk/tools/header-checker/android/build-prebuilts.sh

Change-Id: Ic23fbdb67f7cd0700a3001c644485f7d8d0ee3e2
2019-12-09 17:33:21 -08:00
Logan Chien
0bcd8e31e3 header-checker: Add config file support
This commit add config file support to header-abi-diff so that we can
have per-branch configuration.

Bug: 112760591
Test: ./tests/test.py
Test: ${ANDROID_HOST_OUT}/nativetest64/header-checker-unittests/\
      header-checker-unittests
Change-Id: I1fbd76c93991a2b36121a5f4397c62eb72d486ec
2019-05-13 09:17:49 -07:00
Logan Chien
b1ca6df79d header-checker: Add -allow-adding-removing-weak-symbols
This commit adds `-allow-adding-removing-weak-symbols` option to
`header-abi-diff`.  This allows vendor-specific branch to add or remove
weak symbols from their VNDK shared libs.  This is sometimes necessary
when venders have their compiler toolchain or use different compiler
flags (e.g. inline heuristics).

Bug: 112760591
Test: ./tests/test.py
Change-Id: I94bceacc90cab093e8aa602bb7d866d6f433c5c7
2019-05-09 12:00:22 -07:00
Logan Chien
ef967f7325 header-checker: Cleanup namespaces
Test: ./tests/test.py
Test: ${ANDROID_HOST_OUT}/nativetest64/\
      header-checker-unittests/header-checker-unittests
Change-Id: I65347228e31e63678c2642eaf19a60303cf33683
2019-03-20 14:13:21 +08:00
Logan Chien
b229c4e38f header-checker: Restructure the source tree
Test: ./tests/test.py
Test: ${ANDROID_HOST_OUT}/nativetest64/\
      header-checker-unittests/header-checker-unittests
Change-Id: I6dd907b6fd233ea1f529d263a603c56f9a5034cc
2019-03-20 14:13:21 +08:00