Commit graph

66983 commits

Author SHA1 Message Date
Trevor Radcliffe
44e4102362 Merge "Revert "Block CFI on static libraries"" into main 2023-09-21 18:15:25 +00:00
Treehugger Robot
a56002a473 Merge "Revert^2 "bp2build converter for android_test_helper_app."" into main 2023-09-21 17:56:35 +00:00
Yu Liu
62f7302701 Merge "Convert cc_aconfig_library to bazel." into main 2023-09-21 17:43:07 +00:00
Trevor Radcliffe
85d55c2847 Revert "Block CFI on static libraries"
This reverts commit f9abec0987.

Reason for revert:
https://b.corp.google.com/issues/301444094
https://b.corp.google.com/issues/301443813
https://b.corp.google.com/issues/301437374

Change-Id: I6fd03e4d3c0930005178ad347f53156be8f15efc
2023-09-21 17:04:43 +00:00
Spandan Das
02f2211931 Merge "Always convert ndk_library" into main 2023-09-21 16:18:49 +00:00
Jingwen Chen
6528999872 Revert^2 "bp2build converter for android_test_helper_app."
2395286cda

Change-Id: I698c1e62b87f3d8338d8d207d06f62ec680d71c9
2023-09-21 15:16:59 +00:00
Jingwen Chen
38b7be9d29 Merge "Revert "bp2build converter for android_test_helper_app."" into main 2023-09-21 15:14:29 +00:00
Jingwen Chen
2395286cda Revert "bp2build converter for android_test_helper_app."
Revert submission 2757525-android_test_helper_app

Reason for revert: broke builds

Reverted changes: /q/submissionid:2757525-android_test_helper_app

Change-Id: I0e5f55078221d7f2151f1bbaa55bebdf5051c03c
2023-09-21 15:12:19 +00:00
Jingwen Chen
72e22018c3 Merge "bp2build converter for android_test_helper_app." into main 2023-09-21 15:09:06 +00:00
Romain Jobredeaux
1c4048e08d Merge "Bp2build support for JNI deps of android_app." into main 2023-09-21 14:36:02 +00:00
Trevor Radcliffe
9483e4873c Merge "Block CFI on static libraries" into main 2023-09-21 13:05:21 +00:00
Liz Kammer
53b33d07b1 Merge "Add keep sorted tags" into main 2023-09-21 12:16:10 +00:00
Liz Kammer
af7c166f10 Merge "Handle prebuilt vs source selection in bp2build" into main 2023-09-21 12:15:54 +00:00
Treehugger Robot
8d3ea47ec1 Merge "Mark android apps with jni_uses_*_apis as unconvertible" into main 2023-09-21 03:38:05 +00:00
Treehugger Robot
59da77e19c Merge changes I8cf28041,If271c5f7 into main
* changes:
  Add version to stub label
  Allowlist jni_libs and transitive deps of b/297405812
2023-09-21 02:29:57 +00:00
Yu Liu
855cfc2fac Convert cc_aconfig_library to bazel.
Bug: 297358249
Test: Unit test and CI
Change-Id: Ic84128b0df16efe4255b52b83670ec9902c09383
2023-09-20 17:46:46 -07:00
Spandan Das
e993475ca6 Always convert ndk_library
This soong module will be converted to a cc_stub_suite macro in the
bp2build workspace

Test: TH
Bug: 298085502
Change-Id: I32a1a908d292e04b43d9be3efe7b16d1e4534466
2023-09-20 23:04:02 +00:00
Spandan Das
9d47a82e27 Add version to stub label
This is a followup fix for aosp/2753352 that added the name of the
`cc_stub_suite` as deps of `unbundled_app` config setting. However,
cc_stub_suite is really a macro that expands to <name>-<ver>.

Add the version explicitly to rdeps

Bug: 298085502
Test: b build //build/bazel/examples/android_app/java/com/app:app_with_sdk_variant_of_jni_deps --config=android (with aosp/2755284)

Change-Id: I8cf2804141bb14589e11b03a138b715538a3f1ee
2023-09-20 23:04:02 +00:00
Spandan Das
1262f359a4 Allowlist jni_libs and transitive deps of b/297405812
This is an internal android_test (for now), but the deps are in aosp

Bug: 297405812
Test: TH
Change-Id: If271c5f7d159eafd9db739c2699e4470ce44c825
2023-09-20 23:04:02 +00:00
Treehugger Robot
f2d858e5ba Merge "Enable restat for kapt stubs rules" into main 2023-09-20 20:40:28 +00:00
Treehugger Robot
7ae5a5b8cb Merge "Use same symbol for all receiver functions" into main 2023-09-20 20:34:36 +00:00
Romain Jobredeaux
947dfa760b Bp2build support for JNI deps of android_app.
Change-Id: I3f934ecb0323129e1bb1eb75527395e39467380d
Bug: 297405812
2023-09-20 16:09:13 -04:00
Spandan Das
0e0a880fdd Mark android apps with jni_uses_*_apis as unconvertible
These properties are used to determine if the app should include the sdk
variant of jni libs. Till we support this, mark androi_app/android_test
that set this property as uncovertible in allowlist v2

Bug: 299360988
Test: created a test app in an android.bp and verified that an
equivalent target is not created if either of these props are set

Change-Id: I925745d2667866a12b71788dc8f1bb1e1f3472cc
2023-09-20 19:53:30 +00:00
Sam Delmerico
521eb20dc2 fix failing rust_aconfig_library test
Bug: 301290764
Test: go test .
Change-Id: I4220738595067365be0c2236a05a365a2e90c734
2023-09-20 19:30:47 +00:00
Sam Delmerico
52d1cc334b Merge changes from topics "revert-2746976-revert-2605644-rulebuilder-ninja-vars-OAAWYCDDLT-KMAGKVIXAT", "sandbox-rust-inputs" into main
* changes:
  support sandboxed rust rules
  conditionally escape rule builder command
  Revert^2 "allow Ninja variables in RuleBuilder API"
  Revert^2 "add crate_root property to rust modules"
  Revert^2 "add rust_toolchain_rustc_prebuilt module type"
2023-09-20 18:48:21 +00:00
usta
0391ca4eaa Use same symbol for all receiver functions
cosmetic change

Bug: NA
Test: NA
Change-Id: I1781de1bd2108547f4da2a967d72a3a56e7362ed
2023-09-20 18:01:44 +00:00
Christopher Parsons
c331812a59 Merge "Have ConvertWBp2build use Bp2buildMutatorContext" into main 2023-09-20 17:56:24 +00:00
Colin Cross
ed27322aa5 Enable restat for kapt stubs rules
The output of the kapt stubs rules only change when the public interface
of a kotlin class changes, which makes them a good candidate for restat.
This will prevent some unnecessary reruns of turbine annotation
processing.

Bug: 297356926
Test: builds
Change-Id: I39bd63284fd37058f69a0a3dace1ea5f4f50e8b5
2023-09-20 09:53:39 -07:00
Dennis Shen
6c1121d31b Merge "build system implementation for c/cpp test mode codegen" into main 2023-09-20 16:48:56 +00:00
Trevor Radcliffe
f9abec0987 Block CFI on static libraries
Bug: 295805467
Test: Unit tests and inspecting generated BUILD files
Change-Id: I1bbd2f48ad384e0b5b6f7cc1458b12ded2748e8f
2023-09-20 16:01:20 +00:00
Liz Kammer
8e9ccda5d8 Merge "Don't panic for unhandled product vars" into main 2023-09-20 15:10:18 +00:00
Chris Parsons
637458d326 Have ConvertWBp2build use Bp2buildMutatorContext
This no-op refactoring facilitates some upcoming functional changes for
"bp2build allowlist v2". The work requires that the bp2build conversion
mutator be changed from a TopDown mutator to a BottomUp mutator.
Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext
makes it easier to make this functional change without touching tens of
files and multiple projects.

Bug: 285631638
Test: m bp2build
Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
2023-09-20 14:49:35 +00:00
Jingwen Chen
2848be4236 bp2build converter for android_test_helper_app.
This module converts simply to an android_binary, but with testonly = True.

Test: new unit tests
Test: new example app
Fixes: 283518652
Change-Id: If6b7661c32caa7dada6d492cce106d96236f6205
2023-09-20 14:31:17 +00:00
Dennis Shen
c5e39f521b build system implementation for c/cpp test mode codegen
Bug: b/300488560
Test: added unit test and tested with AconfigDemoActivity app
Change-Id: I6ad71cc2dada8feb53662ec47c8acad5bc43d5ce
2023-09-20 14:27:18 +00:00
Liz Kammer
9e12c78637 Merge changes from topic "prebuilt-cc-shared-always" into main
* changes:
  Implement bp2build for java_sdk_library_import
  Always convert prebuilt libraries
  Always convert prebuilt cc library headers
2023-09-20 13:13:51 +00:00
Treehugger Robot
187af6648d Merge "Make bp2build_all_srcs manual." into main 2023-09-20 12:58:00 +00:00
Aleksei Vetrov
ed8fb7a6a6 Merge "NDK library: use prebuilts to check next level ABI" into main 2023-09-20 11:16:59 +00:00
Jingwen Chen
5802d0795b Make bp2build_all_srcs manual.
So that ... and :all target patterns don't pick it up.

Test: b build //bionic/libc/... and check that none of the filegroups
are built.

Change-Id: I79cd6fb6f7559409ae3e5b95b8b260970810cf7f
2023-09-20 10:25:09 +00:00
Cole Faust
c0f7bd1a15 Merge "Move the android_platform next to it's entrypoint product config file" into main 2023-09-19 20:42:52 +00:00
Liz Kammer
01de3ac619 Add keep sorted tags
Test: n/a
Change-Id: Ibfb96b3e9c2f4707eb585714069bbb81671457b4
2023-09-19 16:04:41 -04:00
Liz Kammer
e1b39a5286 Handle prebuilt vs source selection in bp2build
Test: enable mainline modules build from prebuilts and build
Bug: 300640274
Change-Id: Ib1d6bbca7e0ab459515d3cf6378741e8368e7327
2023-09-19 16:04:39 -04:00
Liz Kammer
9e2a5a7d6d Don't panic for unhandled product vars
Instead, we return an error. This allows us to access some product
variable information earlier when it will not be used as an attribute
without panicing

Test: m nothing
Change-Id: Id094b2b9e1364a8d174d99b3824fa149fb235b3e
2023-09-19 15:58:22 -04:00
Liz Kammer
9a97a8f62a Implement bp2build for java_sdk_library_import
Test: go test bp2build conversion tests
Test: enable modules build from prebuilt and m nothing
Bug: 300640274
Change-Id: I8c015aec546d052bef6c42869e12db4e87d39780
2023-09-19 15:58:22 -04:00
Liz Kammer
e0cbc983ec Always convert prebuilt libraries
Test: CI
Test: patch in CL using prebuilt mainline modules & build
Bug: 300640274
Change-Id: Ie00b111a04198b266985f3e1c34c960844c0a327
2023-09-19 15:58:22 -04:00
Liz Kammer
86a407f284 Always convert prebuilt cc library headers
Test: go tests
Test: CI
Test: patch in CL using prebuilts for mainline modules and build
Bug: 300640274
Change-Id: I73f70dac679e341670e1484ce57bc984f413d409
2023-09-19 15:58:20 -04:00
Christopher Parsons
06ac78ce40 Merge "Refactor bp2build tests for allowlist v2" into main 2023-09-19 19:42:40 +00:00
Chris Parsons
cd209035aa Refactor bp2build tests for allowlist v2
Allowlist v2 will change bp2build by automatically disabling rdeps of
unconvertible modules. Many bp2build tests create bp2build stub modules
without an implementation,
This CL changes setup of such tests to also contain a BUILD file with
"stub implementations" of equivalent targets, to keep these test targets
convertible.

To verify this change in-place, this CL removes `bp2build_available:
false` from these dependencies.

This is a test-only change for bp2build tests.

Bug: 285631638
Test: m bp2build
Change-Id: I489480cbc4158a416b7abf57c35a6e2bc2ad6173
2023-09-19 17:04:11 +00:00
Cole Faust
b4cb0c857f Move the android_platform next to it's entrypoint product config file
Because we're going to start generating partition images for the
product, and the partitions will eventually be checked in, we want
them to be in sensible locations. And the platform should be there as
well so all the targets for a product are co-located.

Bug: 297269187
Test: m nothing && b build --config=android //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Change-Id: Iaa25c44aa00295ada279d5fd49b5498bbafb89d5
2023-09-19 09:54:59 -07:00
Aditya Kumar
a1a29b75db Merge "Revert "Revert "riscv64: enable V.""" into main 2023-09-19 16:52:31 +00:00
Sami Tolvanen
95ad0a9226 Merge "Reapply "Enable CFI for riscv64"" into main 2023-09-19 16:11:26 +00:00