Commit Graph

1325 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
Hsin-Yi Chen
f4f89e7224 Create a module for create_reference_dumps.py
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
2022-07-18 16:58:10 +08:00
Mu-Le Lee
a12115812c Merge changes If1ccc3d9,I198bf3e1,I0d903c16
* 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/
2022-07-15 16:25:59 +00:00
Mu-Le Lee
aee4dbfae4 Refactor GetRefDumpDirStem to avoid excessive arguments passing
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
2022-07-15 05:45:22 +00:00
Mu-Le Lee
ec18592802 Generate dumps for non-VNDK into folder that matches Cross-Version ABI Check mechanism
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
2022-07-14 09:46:38 +00:00
Mu-Le Lee
1a4fb95440 Generate LLNDK ABI dumps to platform/ instead of vndk/
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
2022-07-09 06:13:33 +00:00
Hsin-Yi Chen
a923b62fe5 Remove MIPS data from ABI unit tests
Test: PATH=$PATH:$ANDROID_BUILD_TOP/out/soong/dist/bin \
      development/vndk/tools/header-checker/tests/test.py
Bug: 237966264
Change-Id: If6c7e0fe297f384a703f0a45727618518062363e
2022-07-07 11:01:42 +08:00
Hsin-Yi Chen
c1965c3600 Generate only the necessary data for ABI unit tests
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
2022-07-05 18:34:24 +08:00
Hsin-Yi Chen
93be04bf1f Remove -suppress-errors from header-abi-dumper
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
2022-07-05 11:33:38 +08:00
Mu-Le Lee
83c7085316 Create a cli option to build only the specified target rather than the whole package.
Test: OUT_DIR=out development/vndk/tools/header-checker/android/build-prebuilts.sh \
      header-abi-dumper header-abi-linker
Bug: 237229904
Change-Id: I2f52ac39201a50f081c8393528ad9dc8e953a556
2022-07-01 02:43:24 +00:00
Mu-Le Lee
b55856ae03 Remove location information of unnamed elements in dumps to avoid automerge conflict.
Test: ANDROID_BUILD_TOP=`realpath .` \
      PATH=$PATH:`realpath out/soong/dist/bin`:`realpath out/soong/host/linux-x86/bin` \
      development/vndk/tools/header-checker/tests/test.py
Bug: 236800109
Change-Id: I811d9508166f11f7e69ccbc554bcac8b1f122be6
2022-06-27 03:48:03 +00:00
Mu-Le Lee
e5f137adf2 Update tests due to clang variable and struct naming changes.
Test: ANDROID_BUILD_TOP=`realpath .` \
      PATH=$PATH:`realpath out/soong/dist/bin`:`realpath out/soong/host/linux-x86/bin` \
      development/vndk/tools/header-checker/tests/test.py
Bug: 236780777
Change-Id: I794bcb9e9c922c642c3fbf0808fb60de4445ab65
2022-06-22 04:10:43 +00:00
Hsin-Yi Chen
2ed4052a06 Allow ABI dumps to contain ANDROID_BUILD_TOP that is not a path prefix
Test: ./create_reference_dumps.py -products aosp_x86_64 -libs libm
Bug: 235300136
Change-Id: I75fa175018d6ed0da7a0949ff133869fd874c667
2022-06-13 16:47:32 +08:00
Yi-yo Chiang
c38fa6eb0a Merge "create_reference_dumps.py: Always rebuild lsdump_paths.txt" 2022-05-25 04:03:43 +00:00
Yi-Yo Chiang
43271c7bc8 create_reference_dumps.py: Always rebuild lsdump_paths.txt
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
2022-05-24 18:25:38 +08:00
Yi-Yo Chiang
ec469d15ea create_reference_dumps.py: Clear SKIP_ABI_CHECKS
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
2022-05-24 14:29:01 +08:00
Yi Kong
70645edd80 Update clang-tools build to clang-r450784d
Bug: 219872355
Test: presubmit
Change-Id: I05db5bfbf8562ec8a0ce0f36e4e2446bbb705da0
2022-04-29 02:52:19 +08:00
Yi Kong
76b6aa23c2 Update clang-tools build to clang-r450784c
Bug: 219872355
Test: presubmit
Change-Id: I38ce0c3d9ec7d983f7146509c7701b79ba97f531
2022-04-16 22:32:31 +08:00
Hsin-Yi Chen
6daaa86fc1 Merge "Remove arch variants from ABI dump directory names" 2022-03-16 02:09:40 +00:00
Hsin-Yi Chen
5dee7b0454 Remove arch variants from ABI dump directory names
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
2022-03-10 15:35:32 +08:00
Xin Li
c081864bf3 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I9b94d270148d8ce5fa97f88f460d8c03eac3873c
Change-Id: I34852886e6e98d2964318d6fcc6ebd7292e47544
2022-02-11 06:56:24 +00:00
Pirama Arumuga Nainar
5601077c12 Update OWNERS to go/ab/clang-tools build scripts
So it's easier for the LLVM toolchain team to maintain them.

Test: N/A
Change-Id: Ic4afb996a5c262cb233774cd4bbe114f0fe69663
2022-02-09 11:50:56 -08:00
Pirama Arumuga Nainar
ba7dc83be5 Update clang-tools build to clang-r445002
Bug: http://b/214080353

Test: prebuilts/clang-tools/build-prebuilts.sh
Change-Id: I9792e14a3c20c4b11d0572c18f7da52a4c5b3f6a
2022-02-09 11:45:08 -08:00
Matthew Maurer
3c4124eda2 Add Rust bindgen tool to clang-tools.
Bug: 160803703
Change-Id: Ic895ef1e010c2938ffed5d33f5fca4153f459c14
2022-02-07 23:34:14 +00:00
Bob Badour
082705bfb3 Fix license texts.
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
2022-01-20 19:04:52 +00:00
Chih-hung Hsieh
3051947a48 Merge "Use clang-r437112b for clang-tools build" am: e62be4dbe8 am: 71b755b46e am: bb83d73c92
Original change: https://android-review.googlesource.com/c/platform/development/+/1934620

Change-Id: I0e16dd08e95bf820480a71389d2e33d428b5abbe
2022-01-06 05:36:00 +00:00
Chih-Hung Hsieh
a8bbf841a2 Use clang-r437112b for clang-tools build
Bug: 201432564
Test: presubmit
Change-Id: I2407b49863dce66637a97e26be7f5efbb148c00e
2021-12-28 11:37:04 -08:00
Pirama Arumuga Nainar
5351630a96 Merge changes from topic "use-libclang-cpp" am: a226ebf313 am: dfa837214d am: 361f6dd6a4
Original change: https://android-review.googlesource.com/c/platform/development/+/1901126

Change-Id: Ia3641d4fd06c20564160578984d2f49bbad3788a
2021-12-02 03:18:40 +00:00
Pirama Arumuga Nainar
43ed0e48e9 Switch clang-tools build to clang-r437112 am: 1b19a4956e am: 4f93634073 am: 89005a207b
Original change: https://android-review.googlesource.com/c/platform/development/+/1901125

Change-Id: Ice50a8f7ab219d80b1b5d4cc0ef40d78b4cebb7e
2021-12-02 03:18:39 +00:00
Pirama Arumuga Nainar
f5fae5fcab Use libclang-cpp for header-* tools and tests
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
2021-12-01 03:15:13 -08:00
Pirama Arumuga Nainar
1b19a4956e Switch clang-tools build to clang-r437112
Bug: http://b/150809112
Bug: http://b/201432564

Test: prebuilts/clang-tools/build-prebuilts.sh
Change-Id: If75ab1d554a7926c96144be66a85208e76ded8c3
2021-12-01 02:29:32 -08:00
Treehugger Robot
7081591f0d Merge "Stop building some clang tools for darwin-x86" am: a9ed128e59 am: f8a1df582a am: d0ecd9ae95
Original change: https://android-review.googlesource.com/c/platform/development/+/1885758

Change-Id: Ib11d54b66472618f6fe7b82be928aae0a6ebbf39
2021-11-17 04:46:59 +00:00
Hsin-Yi Chen
5284f9a8a3 Stop building some clang tools for darwin-x86
Test: OUT_DIR=out \
      development/vndk/tools/header-checker/android/build-prebuilts.sh
Change-Id: I767f04f6825e6df054d62d3fa0900bdf7b18db17
2021-11-10 15:43:59 +08:00
Michael Wright
ee8fd7036c S V2 is now 32 am: aa83a1a8ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/16140645

Change-Id: I750e5bd04f62d7882ca1d6eae61f27bfb020b0d7
2021-11-06 16:06:50 +00:00
Michael Wright
aa83a1a8ce S V2 is now 32
Essentially just copied vndk-lib-extra-list-current.txt to
vndk-lib-extra-list-32.txt.

Bug: 204295952
Test: N/A
Change-Id: I76430dd2fef061750cd8d65d3a6c76a173d20bc2
Merged-In: I76430dd2fef061750cd8d65d3a6c76a173d20bc2
2021-11-05 19:38:31 +00:00
Colin Cross
ab1445a006 Use --skip-config --soong-only instead of --skip-make
--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
2021-10-28 16:52:44 -07:00
Yi Kong
2c1959b1b6 Merge "Use clang-r433403 for clang-tools build" am: 6cc411b550
Original change: https://android-review.googlesource.com/c/platform/development/+/1825554

Change-Id: I2d0dbb13ff650eeafa2fa530f48a335f1f0bea90
2021-09-15 05:54:31 +00:00
Yi Kong
6cc411b550 Merge "Use clang-r433403 for clang-tools build" 2021-09-15 05:41:22 +00:00
Logan Chien
035fe0ec30 Merge "[vndk] Cleanup OWNERS files" am: e5518609e1
Original change: https://android-review.googlesource.com/c/platform/development/+/1826269

Change-Id: I75e07c75f8951491860ef8086c21d2cf696925fa
2021-09-15 03:34:47 +00:00
Logan Chien
60b310933a [vndk] Cleanup OWNERS files
This commit removes loganchien@ from OWNERS files because I have left
the team for a while.

Change-Id: Iba39762ca614f0486f30f30bd52add264e7375df
2021-09-14 12:09:08 -07:00
Yi Kong
8644b3a72f Use clang-r433403 for clang-tools build
Bug: 197230471
Test: presubmit
Change-Id: I1d7164a3958acb94974f737cc1c47c6c9bd1a133
2021-09-14 03:22:12 +08:00
Yabin Cui
d83571a55e Merge "Use clang-r428724 for clang-tools build" am: 7a08f15efa am: bb60db74cf
Original change: https://android-review.googlesource.com/c/platform/development/+/1791973

Change-Id: Iaf4cfb82cd062cd8daeff1f5bdf276865853a027
2021-08-11 02:17:50 +00:00
Yabin Cui
85252aed40 Use clang-r428724 for clang-tools build
Bug: 190099451
Test: OUT_DIR=out prebuilts/clang-tools/build-prebuilts.sh
Change-Id: I29cae839d8a9ddd1797b183d4f96db921831583b
2021-08-10 11:31:32 -07:00
Hsin-Yi Chen
b182a52bfd Merge "Extend header-abi-dumper/linker --root-dir" am: ece19b2c70 am: 43a899b438
Original change: https://android-review.googlesource.com/c/platform/development/+/1761252

Change-Id: I50ff7ccd3300f017b1626094a012a2b198b5ee82
2021-07-16 10:45:58 +00:00
Hsin-Yi Chen
94154c1bdf Extend header-abi-dumper/linker --root-dir
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
2021-07-14 15:23:53 +08:00
Hsin-Yi Chen
e9b5ec7b8d Merge "Rename collect_exported_headers.cpp to source_path_utils.cpp" am: 86372bc2f7 am: bc87054422
Original change: https://android-review.googlesource.com/c/platform/development/+/1763369

Change-Id: I035689b0c9779d55fa35cd58abc6430dbd8ed00b
2021-07-14 05:23:08 +00:00
Hsin-Yi Chen
f05428fa44 Rename collect_exported_headers.cpp to source_path_utils.cpp
Test: ./header-checker-unittests
Bug: 192157880
Change-Id: I3adcaaf2eab6cb55ffdf5c5597a599786536823d
2021-07-13 12:31:43 +08:00
Pirama Arumuga Nainar
b5397ef732 Merge "[update_clang-tools.sh] Ignore failures when removing .fetch*" am: e66ad34156 am: 426b539f8f
Original change: https://android-review.googlesource.com/c/platform/development/+/1727690

Change-Id: I78c5caf376e6b36f897af377f09d9a2ca0a3bb7e
2021-06-04 17:28:04 +00:00
Pirama Arumuga Nainar
755c2a3bff [update_clang-tools.sh] Ignore failures when removing .fetch*
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
2021-06-04 05:15:31 +00:00