Commit Graph

72269 Commits

Author SHA1 Message Date
Jihoon Kang
c5be9361b6 Merge "Retain concrete overrides of abstract methods by default" into main 2023-10-11 21:02:17 +00:00
Jihoon Kang
faf7251c7b Merge changes I804d3597,I6a25e2f6 into main
* changes:
  Add module dependency checking testing method
  Add droidstub modules for Soong java testing
2023-10-11 20:43:48 +00:00
Mark Dacek
360e8ebbff Merge "Add b_args_test." into main 2023-10-11 20:37:37 +00:00
Krzysztof Kosiński
58453a7a41 Merge "Enable -Werror=incompatible-function-pointer-types" into main am: 7158f66753
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2715335

Change-Id: I1da83d17b1915f884d4460352af57b063883cf99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 19:43:16 +00:00
Cole Faust
dc3c1454fa Sort genrule allowlists
To avoid merge conflicts.

Bug: 290816499
Test: Presubmits
Change-Id: I8f8ba5112ae87c21dd95513ee1cf0d3d16bccf3f
2023-10-11 12:37:25 -07:00
Zi Wang
040541496a Support prebuilt_root_host in bp2build
Also fix a bug that filename string may contain wild card

Test: Added unittest and CI

Bug: 303725325
Bug: 304590341
Change-Id: I5de9c195343328981a4154024c0fe4e14969ce79
2023-10-11 12:16:26 -07:00
Krzysztof Kosiński
7158f66753 Merge "Enable -Werror=incompatible-function-pointer-types" into main 2023-10-11 19:01:42 +00:00
Yu Liu
8a5b48e26d Merge "Change java_test_host to support cov variant." into main am: 0bf0865f83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2776007

Change-Id: I0c5a1a2c60d486b0b3b91613fa83cf0c4c20cfe7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 17:49:58 +00:00
Jihoon Kang
dff2aea212 Enable hiddenapi check for from-text stub build
This change removes the UNSAFE_DISABLE_HIDDENAPI_FLAGS env var setting
during from-text stub build, and enables hiddenapi list during from-text
stub build.

Test: ENABLE_HIDDENAPI_FLAGS=true m --build-from-text-stub
Bug: 275570206
Change-Id: Ic8cd60e376b978ccc658ff43a44d082eb2759fa5
2023-10-11 17:46:29 +00:00
MarkDacek
055a1207ad Add b_args_test.
Bug: 303269101
Test: run the test
Change-Id: I2c5e72d25dab601ef7354fb9ad624ce035e64812
2023-10-11 17:27:29 +00:00
Ivan Lozano
839b5f9ac5 rust: Temporarily disable ASAN builds for Host
This is breaking sanitized host builds. Disable the sanitizer in Rust
for host targets until this can be resolved.

Bug: 304507701
Test: SANITIZE_HOST=address m rust
Change-Id: I12b0c3e217717de7a89b32198f4c4729709e99b3
2023-10-11 13:18:37 -04:00
Jihoon Kang
244d42a91b Utilize module lib and test api superset module in hiddenapi
Hiddenapi takes a single widest api scope stub dex jar as an input, as
the tool does not support handling duplicate classes passed as inputs.
A problem regarding this is that the test and module lib api surfaces do
not strictly have a subset/superset relationship, unlike other api
surfaces.

This has not become a problem for stubs generated from source
files as the stubs contain all methods in the source files, but became a
problem for stubs genereated from text files as the stubs only contain
the methods that are essential for compilation of the stubs and its
reverse dependencies, and there were cases where the hiddenapi flags are
not properly propagated to the subclasses.

To resolve this problem, a java_api_library module that provides the
union of the test and the module lib api surfaces was introcudes. Since
hiddenapi_modular currently defines the module lib api surface to be a
wider api scope over the test api scope, the new module can be passed as
input to hiddenapi over the module lib non updatable stub module to
resolve the problem.

Test: enable hiddenapi for from-text stub build && ENABLE_HIDDENAPI_FLAGS=true m --build-from-text-stub
Bug: 191644675
Bug: 275570206
Change-Id: I9a230ec5082c52ed866f29b0748814f2cf10279b
2023-10-11 17:06:23 +00:00
Jihoon Kang
f00200b6fb Add module dependency checking testing method
Currently in Soong testing suite, the only method for testing module
dependency is CheckModuleDependencies(...), which comapares for the
exact module dependencies. This change adds the method
CheckModuleDependency(...) which enables checking the dependency between
two modules, instead of comparing for all dependencies of an interested
module.

Test: m nothing
Bug: 288624417
Change-Id: I804d35979ddc24b0134671e326c1d37615ec4190
2023-10-11 16:18:45 +00:00
Jihoon Kang
8f83dcd18c Add droidstub modules for Soong java testing
Previously, only the essential java_api_library and
java_api_contribution modules were being added to the template bp file
for testing purpose. However, since the child change aosp/2640275
adds droidstubs that generates the java_api_contribution as the
dependency of the java_api_library modules, not adding the droidstubs
modules to the template bp file will lead to missing dependency errors
in Soong test cases that tests the from-text generation &
java_api_library functionality.

To prevent this, this change adds the droidstubs modules instead of the
auto generated java_api_contribution modules to the template bp file to
more closely align with the real life behavior.

Test: m nothing
Bug: 288624417
Change-Id: I6a25e2f6c5f1281e96eca15aa5eec7417635df3f
2023-10-11 16:17:55 +00:00
Vinh Tran
14d60d1fd0 Allowlist toolchain/pgo-profiles
Test: m bp2build
Change-Id: I3c4b383941c24aa948e1a42aa782349567398c5f
2023-10-11 12:17:30 -04:00
Yu Liu
0bf0865f83 Merge "Change java_test_host to support cov variant." into main 2023-10-11 16:15:40 +00:00
Christopher Parsons
63bebdd3f0 Merge "Turn on bp2build_deps by default" into main am: c27e8f1427
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2778709

Change-Id: Ic4a3b5a72aa91fadb4d14bf0306ed45fd3e1a233
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 15:52:58 +00:00
Christopher Parsons
c27e8f1427 Merge "Turn on bp2build_deps by default" into main 2023-10-11 15:18:18 +00:00
Jingwen Chen
9c2e3ee54a Move platform constraints to bazel_common_rules.
This enables sharing of platform constraints between platform and kernel builds.

Bug: 304594734

Test: treehugger
Change-Id: I48091eeaf2e529c3f180ba056da3935911868b14
2023-10-11 12:07:44 +00:00
Jason Wu
b221ea837b Merge "Update sh_test conversion to handle data_bins and test_configs properly" into main am: 5a2a94ebf0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2726134

Change-Id: I2151ee7ffd47c7dd1086c3724459ba5693a86851
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 02:14:52 +00:00
Jason Wu
5a2a94ebf0 Merge "Update sh_test conversion to handle data_bins and test_configs properly" into main 2023-10-11 01:11:15 +00:00
Zhi Dou
06f6aa131a Add UnsupportedAppUsage to java_aconfig_library dependency am: 1b052b0078
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2776648

Change-Id: Ic25e2bef69369cea6a4c09b0bfdc28a4b0c27e38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 23:30:34 +00:00
Yu Liu
d8aa20062a Change java_test_host to support cov variant.
Bug: 279960392
Test: CI and m --skip-soong-tests TARGET_PRODUCT=aosp_x86_64 EMMA_INSTRUMENT=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="external/cronet" mts
Change-Id: I4489ed725aee6097e6e340f5f6d06ecaf1c64222
2023-10-10 16:00:32 -07:00
Ramy Medhat
bc06176350 Set download_tmp_dir explicitly to be a directory under the output directory.
This directory is where outputs are download first before being moved
to their final destination to ensure atomicity.

Change-Id: Ic224bf21c07566de00d292d02f1c0f7f727dcb08
2023-10-10 22:33:46 +00:00
Treehugger Robot
0cc1be594c Merge "Enable Flow Sensitive AutoFDO" into main am: d56338cc6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2779552

Change-Id: I7db52fcd38834d7c74c5acc7f5e98dee3719bc54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 19:36:50 +00:00
Jihoon Kang
6df74f24b6 Merge "Introduce system_modules property to java_api_library" into main am: 90c3f5fac4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774869

Change-Id: I387b70dca47360155581402c66fcd20473c9f5e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 19:36:20 +00:00
Zhi Dou
1b052b0078 Add UnsupportedAppUsage to java_aconfig_library dependency
Generated flag requires UnsupportedAppUsage annotation to expose the
flag to CTS tests.

Bug: 301272559
Test: presubit
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5e2c96a93b4c16b224c090570a10697400a42c0a)
Merged-In: I90c87596ca80766ece429ddee1b45723b01d2760
Change-Id: I90c87596ca80766ece429ddee1b45723b01d2760
2023-10-10 19:36:00 +00:00
Treehugger Robot
d56338cc6f Merge "Enable Flow Sensitive AutoFDO" into main 2023-10-10 18:46:26 +00:00
Jihoon Kang
90c3f5fac4 Merge "Introduce system_modules property to java_api_library" into main 2023-10-10 18:33:18 +00:00
Jason Wu
25c69eec45 Update sh_test conversion to handle data_bins and test_configs properly
sh_test.data_bins are used to mark special executable dependencies which should be installed alongside the test entry point's cwd as siblings. This change makes it such that the Tradefed rule places them at the expected location. In addition, this change also incorporates the `tradefed.TestConfigAttributes` to handle the test_configs conversions.

Test: bp2build.sh
Bug: 283486885
Change-Id: Ifeb049c13ae208c785dbdc858f589be8f21109d1
2023-10-10 14:03:19 -04:00
Zi Wang
f8b4e59841 Merge "Address comments from aosp/2777928" into main am: 379257c84b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2779550

Change-Id: Ib2b298f8cdbe55397ea1280d402b09534beac0d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 17:42:55 +00:00
Paul Duffin
629b9d287d Retain concrete overrides of abstract methods by default
Bug: 299366704
Test: m checkapi
Change-Id: I3d9fafefe90a98568c16d80c30e4d1d88a22c350
2023-10-10 17:50:25 +01:00
Zi Wang
379257c84b Merge "Address comments from aosp/2777928" into main 2023-10-10 16:46:13 +00:00
Alix
f7a1027c6b Use an option struct in aapt.buildActions & manifestMerger
Change-Id: Ia056ab321e1fd146ed0cdb98fc2d4455601f648c
Test: Treehugger
2023-10-10 14:31:03 +00:00
Ivan Lozano
73edb1b466 Merge "rust: Emit -x c++ for bindgen modules with cpp_std" into main am: e94f26e2e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2779108

Change-Id: I6d011918f60e9d81c4dc377a341fd869c8c7a2b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 13:41:17 +00:00
Ivan Lozano
e94f26e2e8 Merge "rust: Emit -x c++ for bindgen modules with cpp_std" into main 2023-10-10 13:05:02 +00:00
Ian Zerny
db2d35b8ac Ignore dex files in input archives
Bug: 303264288
Test: m checkbuild
Change-Id: Idce6a8226ca94b257b0ba7b3416b5b1bbffc3140
2023-10-10 14:35:14 +02:00
Zi Wang
2bb12a544a Merge "Use correct module name for java_import in shouldConvertWithBp2build verification" into main am: 57e60bf82b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2777928

Change-Id: I9afccd2aa76f50eeede5f4389ac3e6ae71fbe0bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 05:56:31 +00:00
Zi Wang
57e60bf82b Merge "Use correct module name for java_import in shouldConvertWithBp2build verification" into main 2023-10-10 05:19:10 +00:00
Yi Kong
b33ced051a Enable Flow Sensitive AutoFDO
FSAFDO (Flow Sensitive AutoFDO) is an improvement over AutoFDO. It
attempts to capture and represent the flow-sensitive profile in LLVM
optimization passes with the mechanism to expose and iteratively
reload/match the profile with better precision.

Enable this for all AFDO projects so that we can capture data from the
field, and then evaluate the performance gain.

Test: presubmit
Bug: 304282732
Change-Id: I0de6b4071e4f0a75500f3ffd5171a7be5117ec86
2023-10-10 14:16:29 +09:00
Chris Parsons
d43be7c704 Turn on bp2build_deps by default
This prevents bp2buld conversion of modules which have transitive deps
that are not converted.

This does not change most allowlist semantics -- that change is still to
come. As a result, this effectively removes conversion of a few modules
which were previously converted under old semantics, however, these
modules are not currently used in any meaningful bazel builds, and will
be fixed at a later time.

Test: bp2build.sh
Test: m nothing
Test: manually spotchecked allowlisted modules in metrics to ensure the
diffs were minor
Test: manually verified bp2build performance regresses by about 0.4s

Change-Id: Id5c44fa5394917b28a3e707a81555b9e467d6621
2023-10-10 03:20:16 +00:00
Treehugger Robot
d666762c97 Merge "Revert "Do not convert non-unit tests."" into main am: 6525ee82d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2759038

Change-Id: I759cdb9bbb913f3905976766510d4a7e8641ab38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 02:36:19 +00:00
Spandan Das
e126f16933 Merge "Replace ndk_libs.bzl with an attr in cc_stub_suite" into main am: 0f81762d3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2779333

Change-Id: Id0f7333913ca9e6c43e24846ae8366cc84bd4315
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 02:35:55 +00:00
Treehugger Robot
6525ee82d7 Merge "Revert "Do not convert non-unit tests."" into main 2023-10-10 02:22:14 +00:00
Spandan Das
0f81762d3f Merge "Replace ndk_libs.bzl with an attr in cc_stub_suite" into main 2023-10-10 02:18:09 +00:00
Yi Kong
b61a2851db Merge "Remove GLOBAL_THINLTO build option" into main am: cdd6a47bbf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2778667

Change-Id: I3c87757d32dabc8c7df0d9faad100c1beb17d19e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 02:16:38 +00:00
Yi Kong
cdd6a47bbf Merge "Remove GLOBAL_THINLTO build option" into main 2023-10-10 01:41:56 +00:00
Zi Wang
74c9a7758b Address comments from aosp/2777928
Test: CI
Change-Id: I0d8ee145d797e44338b7eca91fda4177464d7bdb
2023-10-09 17:56:06 -07:00
Spandan Das
57d925dae0 Merge "Allowlist jni libs of FrameworksNetsTests" into main am: 008f2e55c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2776931

Change-Id: I7fa24446059cd83bd9050f8f574bbe54765613ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 00:14:53 +00:00
Treehugger Robot
22030149cf Merge "Denylist genrules that fail to build with sandboxing" into main am: f292a424d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2776870

Change-Id: Ic74d4dbd037689c398dea1863d5a77f0a18c37b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 00:14:44 +00:00