Commit graph

72287 commits

Author SHA1 Message Date
Alix Espino
37e64f9c91 Merge "Use an option struct in aapt.buildActions & manifestMerger" into main 2023-10-12 02:53:10 +00:00
Jingwen Chen
a4c330e076 Merge "Move platform constraints to bazel_common_rules." into main 2023-10-12 02:22:26 +00:00
Treehugger Robot
452b794c33 Merge "TestJavaHostGeneral Fix" into main 2023-10-12 01:37:32 +00:00
Ramy Medhat
67b4973126 Merge "Set download_tmp_dir explicitly to be a directory under the output directory." into main 2023-10-12 01:05:18 +00:00
Krzysztof Kosiński
69101d699c Merge "Revert "Enable -Werror=incompatible-function-pointer-types"" into main 2023-10-11 23:16:07 +00:00
Ramya Subramanian
5e75975e04 Revert "Enable -Werror=incompatible-function-pointer-types"
This reverts commit 07c362bf7f.

Reason for revert: DroidMonitor: Potential culprit for Bug 304839693 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.

Change-Id: Iafb894510c48af2dd8b015d7264a031ff9348884
2023-10-11 23:00:33 +00:00
Alix
42d7ac96bc TestJavaHostGeneral Fix
This fixes "expected 2 bazel modules in "." but did not find any"
error that the test was getting.

Test: got test ./bp2build
Change-Id: I376c7c9974d301fc85894ecf2b0838c863a74a47
2023-10-11 22:39:27 +00:00
Treehugger Robot
154cf29b57 Merge "Sort genrule allowlists" into main 2023-10-11 22:35:21 +00:00
Treehugger Robot
36674db0b3 Merge "Use make_mock_top function" into main 2023-10-11 22:10:48 +00:00
Cole Faust
b36e79c72c Add GENRULE_SANDBOXING=false to non-sandboxed builds
Because sandboxing is becoming the default.

Bug: 290816499
Test: Presubmits
Change-Id: Icd8cb70f0275bafc580c7123a9d38991ac58adbf
2023-10-11 14:52:08 -07:00
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
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
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
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
5a2a94ebf0 Merge "Update sh_test conversion to handle data_bins and test_configs properly" into main 2023-10-11 01:11:15 +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
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
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
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
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
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
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
Zi Wang
734266b633 Use correct module name for java_import in shouldConvertWithBp2build verification
This change makes sure that prebuilt module has correct module name
prefix("prebuilt_") inside method shouldConvertWithBp2build, to avoid
the bp2build conflict issue when a normal module and a prebuilt module
with the same name are both allowlisted.

Test: CI, added unit tests and the steps to reproduce in b/303376793

Bug: 303376793
Bug: 303868211
Change-Id: I4f1126182ec1f52ae6a08046a77204939230edef
2023-10-09 16:51:35 -07:00
Spandan Das
008f2e55c7 Merge "Allowlist jni libs of FrameworksNetsTests" into main 2023-10-09 23:38:59 +00:00
Treehugger Robot
f292a424d4 Merge "Denylist genrules that fail to build with sandboxing" into main 2023-10-09 23:35:39 +00:00
Jingwen Chen
6e119745b8 Revert "Do not convert non-unit tests."
This reverts commit 80b54d2502.

Reason for revert: caused hello_world_test to not be converted, but it's a test that builds/passes

Bug: 300117121

Change-Id: I805cfb336b7f58a5a1e295cade16be4c471e2ed5
2023-10-09 23:21:54 +00:00
Treehugger Robot
cbe61221b6 Merge "Remove ?= assignements to product variables" into main 2023-10-09 22:20:16 +00:00