Commit Graph

1451 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
Bob Badour
4669788a83 Replace obsolete notice property with licenses
Generate `license {}` modules instead of `filegroup {}` modules.

Reference the generated `license {}` modules using the `licenses:`
property.

Bug: 192434786

Test: m droid dist
Change-Id: I894c37bba3edeeb9c6af86bee342a31c334d084c
2022-07-15 11:04:26 +09: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
Justin Yun
fea111c2a7 Avoid duplicated module name for vndk_prebuilt_shared
There may have prebuilt files that share a single name causing
duplicated module name error. Fix this bug by generating the
vndk_prebuilt_shared module per each module name.

Bug: 225265099
Bug: 225243872
Test: development/vndk/snapshot/gen_buildfiles.py
Change-Id: I2f6df9956d33b2ed0e901d73c93621ff4727370d
2022-03-18 12:03:52 +00: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
Rob Seymour
2ff1e6fc78 Add root directory when copying owner file.
Owner file is copied after changing to the install directory.
Capture the root directory before changing directory and add to copy_owners.

Test: python3 development/vndk/snapshot/update.py ..
Bug: 214089693
Change-Id: I82e79441bdec4638002a00aaeef4ec107b180427
2022-02-03 16:22:10 +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
8d930711a3 Merge "Add license_kinds to VNDK snapshot modules" am: 194afe85d5 am: 0a7ff6a6b9 am: a078b426d7
Original change: https://android-review.googlesource.com/c/platform/development/+/1895253

Change-Id: I844116c172c090fc9584a225953d51f45e9765c0
2021-11-23 00:35:10 +00:00
Justin Yun
3e78977d25 Add license_kinds to VNDK snapshot modules
The script reads the license files and list them to the license
module in the generated Android.bp files

Bug: 205641081
Test: run gen_buildfiles.py
Change-Id: I93deb04a5e7da25a2e9476b8fdd6079fc5470211
2021-11-22 16:34:16 +09: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
Treehugger Robot
ad6b7a1a92 Merge "Add 'license' module to the generated Android.bp of VNDK snapshots" am: 189f4b5005 am: 405a8671f4 am: bdb4270c2e am: 8e7f7321a9
Original change: https://android-review.googlesource.com/c/platform/development/+/1885755

Change-Id: If4087474f06d87f10055c7f0ee64bedf60ebd264
2021-11-10 07:12:48 +00:00
Justin Yun
f073b74670 Add 'license' module to the generated Android.bp of VNDK snapshots
VNDK snapshot update must include 'license' module in Android.bp
files. Use the license text files in common/NOTICE_FILES directory.

Bug: 205641081
Test: python3 gen_buildfiles.py 30
Change-Id: Ia0d667664693a00aa29164e94d2a820c6ed77e4e
2021-11-10 13:28:24 +09: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
44c45759f9 Merge "Use --skip-config --soong-only instead of --skip-make" 2021-10-29 15:43:34 +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
Justin Yun
084664b95a Add OWNERS to vndk snapshot directories
Copy the OWNERS in this directory to the VNDK snapshot prebuilt
directories to protect the snapshots from random updates.

Bug: 202780389
Test: generate snapshots
Change-Id: I778616762ee017f87c771fbf6628887178fda86f
2021-10-26 13:33:05 +09:00
Inseob Kim
deb5beb698 Rename soong outdir to generated-headers
vndk snapshot captures exported headers as-is, but soong intermediates
directory name is used as a result. It may confuse users, so this
changes the intermediates directory name to "generated-headers".

Bug: 200159267
Test: install snapshot and build
Change-Id: I3da7ee98f53e460c448c05ad3456022888099888
Merged-In: I3da7ee98f53e460c448c05ad3456022888099888
(cherry picked from commit 6547080f72)
2021-10-08 08:09:36 +00:00
Treehugger Robot
ae20ec1ed3 Merge "Add inseob@ to OWNERS" am: 6188042c71
Original change: https://android-review.googlesource.com/c/platform/development/+/1835075

Change-Id: I96bab2171f9a7c9ec12174c16668482097443be0
2021-09-27 00:40:31 +00:00
Inseob Kim
5b9106a684 Add inseob@ to OWNERS
Test: N/A
Change-Id: I2f7f739b53312e7c99f3a3a28cf164eb20582a34
2021-09-24 14:22:22 +09: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