Commit graph

72212 commits

Author SHA1 Message Date
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
Treehugger Robot
a1e713fe24 Merge "Exclude REL from preview API levels." into main 2023-10-09 20:34:06 +00:00
Spandan Das
7836d75592 Merge "Allowlist jni libs of FrameworksNetsTests" into main 2023-10-09 19:55:00 +00:00
Cole Faust
8e15f69709 Remove ?= assignements to product variables
In make, all product variables are assigned to an empty string before
including the product config makefiles. In starlark, we don't do that
just so the memory usage is smaller. This means that in make, using
?= to assign a product config variable has no effect. Replicate this
behavior in starlark by not emitting any code for ?= assignments of
product variables.

Fixes: 304324003
Test: go test
Change-Id: Id31531506ac9e372a1bea92ce9ae8e17ae0ca70c
2023-10-09 12:26:21 -07:00
Spandan Das
17a27f0c14 Replace ndk_libs.bzl with an attr in cc_stub_suite
(This CL is a cleanup, and should be a no-op)

Currently we support three variations of cc api stubs.
1. publicapi stubs, i.e. ndk stubs (empty additional args to ndkstubgen)
2. module-libapi stubs that are also an ndk library (--systemapi --apex)
3. module-libapi stubs that are not an ndk library (--systemapi --apex
   --no-ndk)

ndk_libs.bzl was used to differentiate between (2) and (3). This creates
an additional layer of indirection - users will need to modify this
external .bzl file if they would like to add a library to an ndk.

Replace this with an explicit atttibute in cc_stub_suite macro for better UX.

Test: go test ./bp2build
Test: b test //build/bazel/rules/cc:cc_stub_library_tests (added in
sibling CL)
Bug: 299501496

Change-Id: Idd3579e8013bae7a1740534f90d2767df5bac1a5
2023-10-09 18:07:39 +00:00
Jihoon Kang
4ec24870e0 Introduce system_modules property to java_api_library
System_modules property provides the jars passed as bootclasspath when
compiling the stubs in the java_api_library where its creating
java_sdk_library's sdk_version is none, as the jars will not be provided
from the full_surface_stub_libs but compiled by itself in the child
change.

The jar provided by the system_modules will also be passed to metalava
to resolve hierarchy coming from outer dependencies.

Test: m --build-from-text-stub
Bug: 288624417
Change-Id: I8f3b89efa24bceb070d7a37fae3c7334dd7f0868
2023-10-09 17:44:54 +00:00
Elliott Hughes
69cf8a3221 Merge "Have the sanitizers trap rather than abort." into main 2023-10-09 16:08:05 +00:00
Treehugger Robot
37fb733466 Merge changes from topic "aapt2_toggle_bazel" into main
* changes:
  Allowlist prebuilt version aapt2
  Allowlist kotlinx_coroutines_android
2023-10-09 16:02:37 +00:00
Ivan Lozano
829e1e9378 rust: Emit -x c++ for bindgen modules with cpp_std
rust_bindgen modules which defined cpp_std with a .h file were not
correctly emitting the `-x c++` flag. This CL addresses that, and
ensures that if either cpp_std or c_std is set then the appropriate
behavior occurs no matter the file extension.

Bug: 304269101
Test: Soong tests
Change-Id: I71a8ae30ac0ed502d9d3fbf2f3039b0c56529d39
2023-10-09 11:52:18 -04:00
Yi Kong
950c17435d Remove GLOBAL_THINLTO build option
GLOBAL_THINLTO is now default, since it improves build speed, produces
more performant code and smaller binary. Remove the option to turn it
off since we no longer maintain that variation, and that simplifies the
logic (esp. for moving CFI builds to ThinLTO).

Also fixed a bug where ThinLTO is not propagated to its static deps on
non-default targets (32-bit or host).

Test: presubmit
Bug: 169004486
Change-Id: I31f41ba27c2b94a384d2ba5027049c307d6f4334
2023-10-09 10:56:14 +00:00
Yi Kong
0b6c4b7c08 Merge "Change lto_test to use GlobalThinLTO configuration" into main 2023-10-09 10:41:28 +00:00
Kiyoung Kim
f161d653cf Merge "Disable TARGET_VNDK_USE_CORE_VARIANT if VNDK is deprecated" into main 2023-10-09 05:31:12 +00:00
Krzysztof Kosiński
5a55439d12 Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I2d7ef129bc8cad247d805ad392f05cd9d517b67e
2023-10-07 19:59:58 +00:00
Treehugger Robot
a32f556ad3 Merge "Handle include statements with trailing whitespace" into main 2023-10-06 22:25:04 +00:00
Colin Cross
c00fa152f7 Fix manifest_check.py for generated manifests that have no application tag
Make generates manifests for modules that are missing AndroidManifest.xml
files in order to paper over differences between aapt and aapt2.  These
manifests don't have an <application> tag. which was tripping up an
unexercised error path in manifest_check.py.

Change manifest_check,py's extract_uses_libs_xml to consider manifests
with no application tag as having empty uses_library and
optional_uses_library lists.  Also fix up a few nearby pylint warnings.

Fixes: 303554426
Test: m ConnectivityMonitorRobotests
Change-Id: I3815a1c86e24d7b3dea7f4ea26c34d3af182ded1
2023-10-06 13:24:38 -07:00
Treehugger Robot
6bc88ae14d Merge "Allowlist AndroidFrameworkLintChecker" into main 2023-10-06 20:17:25 +00:00
Krzysztof Kosiński
07c362bf7f Enable -Werror=incompatible-function-pointer-types
Bug: 296321145
Test: presubmit
Change-Id: I9c056285263061e17e53c4924dcd32bf5310ed91
2023-10-06 20:06:47 +00:00
Treehugger Robot
9ea1d061b7 Merge "Update Headers_only to a bool pointer" into main 2023-10-06 19:59:17 +00:00
Alyssa Ketpreechasawat
2711ce2e1f Merge "Revert "Revert "Disable hiddenapi check for building from prebuilts.""" into main 2023-10-06 19:17:40 +00:00
Cole Faust
10b31340a6 Denylist genrules that fail to build with sandboxing
These were added with the android 14 release.

Bug: 290816499
Test: run genrule_sandbox_test.py with a local change to check all genrules in the tree
Change-Id: Icf3627c245638ab3f73b83e24ef04c916d7ab58b
2023-10-06 12:01:02 -07:00
Cole Faust
b0b2457842 Handle include statements with trailing whitespace
Fixes: 303832950
Test: go test
Change-Id: I919556ee43a60f59dbd7c040025f01abb53da2a8
2023-10-06 11:57:29 -07:00
Dan Albert
dbd4a25cf7 Merge "Fix error message to still be an error." into main 2023-10-06 18:55:32 +00:00
Vinh Tran
001ec85bcc Merge "Export device arm64 rust flags to Bazel" into main 2023-10-06 17:50:15 +00:00
Romain Jobredeaux
69e2d83e8d Allowlist prebuilt version aapt2
Bug: 303786272
Test: CI + Manual build
Change-Id: I0a748430e4f2c4d77c6564562c3a85b0dc4368e4
2023-10-06 13:46:42 -04:00
Romain Jobredeaux
f2e3c111ec Allowlist kotlinx_coroutines_android
Change-Id: Ib097d43e0abb6a94cdb4e0ff13d6ac3e0c13da9f
2023-10-06 13:46:15 -04:00