Commit Graph

1343 Commits

Author SHA1 Message Date
Mu-Le Lee
7b72a4f5f1 Merge "Implement the Cross-Version ABI diff configuration" 2022-08-19 08:25:45 +00:00
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
e43c2bc9a7 Merge "Change the format of header-abi-diff config from .ini to .json" 2022-08-17 05:58:15 +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
Treehugger Robot
5fcc737b41 Merge "Set ALLOW_UNKNOWN_WARNING_OPTION" am: 5a5aa3357a
Original change: https://android-review.googlesource.com/c/platform/development/+/2161662

Change-Id: If7f0dd37bed7d027c3aecee9c20fd3426de8b8b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:29:58 +00:00
Yi Kong
7549a9f9a6 Set ALLOW_UNKNOWN_WARNING_OPTION
header-checker build may use an older version of clang than the platform
version, causing errors for unknown cflags. Setting the env var allows
these errors to be suppressed.

Test: presubmit
Change-Id: Icf08ec5913f5608ffc1e14daf3e6ed71610f733a
2022-07-21 17:45:07 +08:00
Steven Moreland
d3e6c8e283 Merge "Create a module for create_reference_dumps.py" am: ba781b8eac
Original change: https://android-review.googlesource.com/c/platform/development/+/2157919

Change-Id: I3032e52c529a9661ff5da8e60a2b9b60b4572839
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 16:02:08 +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
00e22d110d Merge changes If1ccc3d9,I198bf3e1,I0d903c16 am: a12115812c
Original change: https://android-review.googlesource.com/c/platform/development/+/2152453

Change-Id: I8587548ab48c84f4cd5bd5a6f3eb71f656738a2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 16:47:02 +00: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
ae48bf1087 Merge "Remove MIPS data from ABI unit tests" am: cd2a609c4e
Original change: https://android-review.googlesource.com/c/platform/development/+/2147663

Change-Id: Ic054d06952f07ad9d5de4129f665a998f23566c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 09:35:30 +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
232ac91360 Merge "Generate only the necessary data for ABI unit tests" am: bd1460dca5
Original change: https://android-review.googlesource.com/c/platform/development/+/2145588

Change-Id: I43695a24b948c096112f22a059af897937feaa83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 02:55:48 +00: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
32b7f690af Merge "Remove -suppress-errors from header-abi-dumper" am: 871a22ffae
Original change: https://android-review.googlesource.com/c/platform/development/+/2145581

Change-Id: Ia0344d169b8c67350658784e1bfbfd4c0cdba835
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-05 08:35:09 +00: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
cff9bcf5ae Merge "Create a cli option to build only the specified target rather than the whole package." am: 59b0ddfffd
Original change: https://android-review.googlesource.com/c/platform/development/+/2136832

Change-Id: I3db3e75ee1620e5cbf539966b0cddef35c7838cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 05:04:11 +00: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
Xin Li
33c6138be7 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I794bcb9e9c922c642c3fbf0808fb60de4445ab65
Change-Id: Id292c36692b0020d772dc61b863f9cd3b39fe0c5
2022-06-27 23:37:25 +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
Treehugger Robot
ea6cc3fbbb Merge "Update tests due to clang variable and struct naming changes." am: 8b3339921b am: 972cbb2a83
Original change: https://android-review.googlesource.com/c/platform/development/+/2133256

Change-Id: Id38abf46ca6ddc06eca2dc4a69adb262486e12b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 08:45:52 +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
Treehugger Robot
eaf1d60e74 Merge "Allow ABI dumps to contain ANDROID_BUILD_TOP that is not a path prefix" am: 1a4e4daf49 am: 57d34a4b72
Original change: https://android-review.googlesource.com/c/platform/development/+/2122585

Change-Id: Iac81cc503a0b7e819cd80a4d5a19c475aaa5ba23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 10:46:58 +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
b1beda3e95 Merge "create_reference_dumps.py: Always rebuild lsdump_paths.txt" am: c38fa6eb0a am: f80aa1285c
Original change: https://android-review.googlesource.com/c/platform/development/+/2096997

Change-Id: I9d4ed4a7685a2d74ac1602020b0a4e52418a3f20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 04:44:39 +00: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
Treehugger Robot
68cbc67553 Merge "create_reference_dumps.py: Clear SKIP_ABI_CHECKS" am: 323c559e2e am: 765adcd583
Original change: https://android-review.googlesource.com/c/platform/development/+/2101513

Change-Id: I1d681b86b5beb56ff1eef06de1a42cebd0c4f06d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 09:17:02 +00: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
f0404f6582 Update clang-tools build to clang-r450784d
Bug: 219872355
Test: presubmit
Change-Id: I05db5bfbf8562ec8a0ce0f36e4e2446bbb705da0
(cherry picked from commit 70645edd80)
Merged-In: I05db5bfbf8562ec8a0ce0f36e4e2446bbb705da0
2022-04-29 09:31:02 +00: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
3c7bcc23bb Merge "Update clang-tools build to clang-r450784c" am: 0228b3a92e am: a9f1d7ba01 am: 8527613189
Original change: https://android-review.googlesource.com/c/platform/development/+/2064972

Change-Id: I2ebe26921d324fd8908d4b2593cb876775f205ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 19:48:49 +00: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
Yurii Zubrytskyi
16c6e8f362 platform/development - Tiramisu is now 33
Bug: 225745567
Test: Build
Change-Id: I1c5ae315e87809e2a8ec1bc1295cb5ea6d0cf865
2022-04-11 08:10:42 -07: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