Commit Graph

67050 Commits

Author SHA1 Message Date
Todd Lee
f09f5d7995 Merge "Support for incremetal platform prebuilt APIs" into main am: 5b6d1d87d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2726799

Change-Id: I8f17b42119655787ba6f17868a3006b3e96d37ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 19:16:31 +00:00
Todd Lee
5b6d1d87d6 Merge "Support for incremetal platform prebuilt APIs" into main 2023-08-28 18:42:58 +00:00
Ivan Lozano
df0e3b1b71 Merge "rust: Rust sanitized snapshots variations" into main am: 791f60365e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2723878

Change-Id: I4205d02a6a4427091455d8ea3241d310ee2ef253
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 18:35:54 +00:00
Ivan Lozano
791f60365e Merge "rust: Rust sanitized snapshots variations" into main 2023-08-28 18:01:22 +00:00
Treehugger Robot
3f352577f8 Merge changes from topic "java-proto-include-dir" into main am: 7eb6ffc796
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2723480

Change-Id: I6c7c4dbed074f32a3b50a2e5adb670f154bc818a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:54:41 +00:00
Spandan Das
9c892b8daa Translate python_libray.pkg_path to proto.import_prefix am: cb847638af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2721823

Change-Id: Ib5f6ee9478486881d6b4b079791bab78f2b3c2ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:54:36 +00:00
Treehugger Robot
7eb6ffc796 Merge changes from topic "java-proto-include-dir" into main
* changes:
  Handle proto.include_dirs for java
  Translate python_libray.pkg_path to proto.import_prefix
2023-08-28 17:18:29 +00:00
Alix Espino
6af68b8270 Merge "support for multiple filegroups and resource_dirs" into main am: 5dbb696c53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2626338

Change-Id: I8c3500b085c3443d0a93d3f3f8c130baefa64923
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:12:08 +00:00
Wei Li
0b2472a365 Merge "Use ninja rspfile for list of provenance metadata file of modules, in case there are many provenance metadata files and the list might exceed the command line length limit." into main am: d632171e93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2726916

Change-Id: I1298e05ea700b725201d97ed588edc5edf442e76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:11:45 +00:00
Alix Espino
5dbb696c53 Merge "support for multiple filegroups and resource_dirs" into main 2023-08-28 17:10:13 +00:00
Wei Li
d632171e93 Merge "Use ninja rspfile for list of provenance metadata file of modules, in case there are many provenance metadata files and the list might exceed the command line length limit." into main 2023-08-28 16:17:27 +00:00
Treehugger Robot
82c3fafd8f Merge "Add aconfig annotations for java_aconfig_library" into main am: 01f70e8d0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2682307

Change-Id: I1438c67f334f38cc17c75ea9cc08cddab5496171
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 13:41:38 +00:00
Treehugger Robot
01f70e8d0e Merge "Add aconfig annotations for java_aconfig_library" into main 2023-08-28 13:03:56 +00:00
Ian Zerny
2d8d538c2b Merge "Translate SDK level 10000 to a valid compiler min-api" into main am: f94c8113a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2727794

Change-Id: I62732250881d9bb8f1922c7afe8b93cab70559e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 07:23:06 +00:00
Ian Zerny
f94c8113a3 Merge "Translate SDK level 10000 to a valid compiler min-api" into main 2023-08-28 06:26:36 +00:00
Joe Onorato
8f75585b37 Add aconfig annotations for java_aconfig_library
Test: m
Bug: 289087078
Change-Id: I860b91f984b2f2c596360490337fb25a4df7a988
2023-08-26 08:26:18 -07:00
Vinh Tran
6c28803c66 Merge changes from topics "build-aconfig", "build-libprotobuf-for-host-only" into main am: 54a5905803
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2726675

Change-Id: Ib0f42a43a92e2b490c5a8d3ed46210d55235b0c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-26 03:34:58 +00:00
Vinh Tran
54a5905803 Merge changes from topics "build-aconfig", "build-libprotobuf-for-host-only" into main
* changes:
  Allowlist aconfig
  Implement bp2build converter for rust_protobuf_host
  Implement bp2build converter for rust_binary
  Convert libprotobuf to Bazel
  Allowlist all aconfig deps modulo libprotobuf and libaconfig_protos
  Implement bp2build converter for rust_proc_macro
  Allowlist rust_library dependencies of aconfig
  Implement bp2build converter for rust_library
2023-08-26 03:17:59 +00:00
Vinh Tran
85b177dff7 Allowlist aconfig
Test: b build //build/make/tools/aconfig:aconfig
Bug: 295910295
Change-Id: Ic71b2982a715b9ea36f8bf40fc5158e6f58f6a2c
2023-08-25 18:03:43 -04:00
Vinh Tran
0c4b9ec5e0 Implement bp2build converter for rust_protobuf_host
Test: go test
Bug: 295925256
Change-Id: I43b7359da8fc19f4338e2583448b7617194df5e6
2023-08-25 18:00:33 -04:00
Vinh Tran
093a57edb2 Implement bp2build converter for rust_binary
Test: go test
Bug: 295910295
Change-Id: Ieb18d9071f28e53a0463614594cee0fd755b7b3c
2023-08-25 17:58:53 -04:00
Vinh Tran
9b84678faf Convert libprotobuf to Bazel
Since this is a one-off just for building libprotobuf that will be removed when we handle cargo output more generically (b/297364081), I didn't write a unit test for this CL.

Test: b build //external/rust/crates/protobuf:libprotobuf
Bug: 295925256
Change-Id: I00cf44d54be27a09c184a96c13b250a2e54e2d10
2023-08-25 17:53:37 -04:00
Wei Li
04e4dfa26e Use ninja rspfile for list of provenance metadata file of modules, in case there are many provenance metadata files and the list might exceed the command line length limit.
Bug: 297350341
Test: CIs & manual test
Change-Id: Iff4da6de019d62d7ce8545241b3a289cff0f33de
2023-08-25 14:52:07 -07:00
Vinh Tran
c1a6ceefd3 Allowlist all aconfig deps modulo libprotobuf and libaconfig_protos
Test: b build //external/rust/crates:all
Bug: 295903972
Change-Id: Ieb29516722155ef8921e454eaa1ea51fad99ec08
2023-08-25 17:51:54 -04:00
Vinh Tran
b4bb20f583 Implement bp2build converter for rust_proc_macro
Test: WIP
Bug: 297356482
Change-Id: I17d1a0a95d4a67ccbc9b2d74e49bcacd6ff4d26b
2023-08-25 17:50:48 -04:00
Vinh Tran
3570ce3f69 Allowlist rust_library dependencies of aconfig
These deps are not depdendent on libaconfig_protos (rust_protobuf_host) and rust_proc_macro modules.

Test: b build //external/rust/crates/...
Bug: 295910506
Change-Id: I1c6058d029c2d475bd760ae9497fe78343a13882
2023-08-25 17:45:24 -04:00
Vinh Tran
bcb5f57eed Implement bp2build converter for rust_library
Test: go test
Bug: 297294749
Change-Id: I5400fe2c0fe2097b7a5810c736fbd1de4f35c6f7
2023-08-25 17:42:13 -04:00
Makoto Onuki
c10a2c20dd Support java_data in sh_test_host am: 1725b20d14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2726813

Change-Id: I4251e3577dd2985f62827ec5bcaf5fe7d86ea001
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-25 18:23:16 +00:00
Todd Lee
2ec7e1c55c Support for incremetal platform prebuilt APIs
This change provides support for prebuilt incremental platform API (i.e.
API changes associated with a QPR, as opposed to a major dessert
releas).

This feature is provided via the existing prebuilt_apis module with the
introduction of a new attribute:

    allow_incremental_platform_api

While typical platform prebuilt APIs are presumed to be under a
directory structure that follows the pattern:

<version>/<scope>/<module>.jar
<version>/<scope>/api/<module>.txt

Where <version> is limited to a single integer signifying the API level.

For modules where allow_incremental_platform_api is set to 'true' (false
by default) the pattern is the same, however <version> is presumed to be
of the form MM.m, where MM aligns with the existing API level and m
signifies the incremental release (e.g. QPR).

Bug: b/280790094
Test: platform build check with both incremental & non-incremental API
      cd build/soong && go test ./java
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:eee6995093485497bc29cdce01c2a86765ffb4eb)
Change-Id: I67e293006ccfa210d0dcc0a294db894632f1b6cb
2023-08-25 18:03:44 +00:00
Ivan Lozano
5467a39984 rust: Rust sanitized snapshots variations
This adds support for correctly handling Rust sanitized snapshots,
ensuring they only have one variation.

The presence of multiple variations were causing build failures
when a rust_fuzz module for host was defined and a snapshot
build was requested.

This also sets -Z link-native-libraries=no on host modules
(in addition to device modules) to avoid emitting extra linkage
flags due to link attributes.

Bug: 282897366
Test: SOONG_SDK_SNAPSHOT_USE_SRCJAR=true m
Change-Id: Idf980c29145f11c530ad635a4eb5b01a1730ac24
2023-08-25 12:54:56 -04:00
Alix
289e9c607b support for multiple filegroups and resource_dirs
Test: tests in bp2build and b build //external/emma:emma

Change-Id: I57e60389aec926c55d01818a6a3b1ec33e9c53b8
2023-08-25 16:12:15 +00:00
Ian Zerny
c26029b473 Translate SDK level 10000 to a valid compiler min-api
Targets with the special level 10000 are compiled using the current
platform SDK level. They are also compiled as a "platform build" which
will disable features such as API modeling and method backports.

Bug: 295591477
Test: manual inspection of the updated build commands
Change-Id: Ifda8859396b33dde4c46a9b212ddb855b012bf07
2023-08-25 13:48:21 +02:00
Makoto Onuki
1725b20d14 Support java_data in sh_test_host
Bug: 297225342
Test: with a custom test rule
Test: cd sh && go test ./...
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:de5d265a798ce0e12ad0a2d0a6675942df5cd10b)
Merged-In: Ia5a60fa6d917f2c2fde56df543625024ec11877a
Change-Id: Ia5a60fa6d917f2c2fde56df543625024ec11877a
2023-08-24 22:17:56 +00:00
Treehugger Robot
4e3ee2c9a5 Merge "Add the system image test to the bazel sandwich" into main am: 4e6c42d417
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2724199

Change-Id: Ib462d61af54b11a64bb9b5220b97dac7ce0e094b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 22:07:15 +00:00
Treehugger Robot
4e6c42d417 Merge "Add the system image test to the bazel sandwich" into main 2023-08-24 21:50:22 +00:00
Spandan Das
ccce31bb74 Merge changes from topic "proto-include-dir-py" into main am: 234bb3bd8d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2721824

Change-Id: Iec171d46c05ba9c5a2fdc47e8a63f58940a90879
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 21:27:12 +00:00
Spandan Das
234bb3bd8d Merge changes from topic "proto-include-dir-py" into main
* changes:
  Handle proto.include_dirs in bp2build for py
  Add proto.local_include_dirs support in bp2build
  Add manual tag to proto_library at the root package
2023-08-24 20:57:47 +00:00
Spandan Das
cb847638af Translate python_libray.pkg_path to proto.import_prefix
If a python_library uses a pkg_path foo/bar, then the proto srcs in
that libray need to import the dep .proto as foo/bar/proto.proto.

This behavior is restricted to python modules. To implement this is in
bp2build, this CL creates a new interface with a single method
`PkgPath`. Only python module structs implement this interface, and
this method is only available during bp2build

Test: Added a bp2build unit test
Test: TH

Change-Id: If8d207c0b321f75337a053795826b283a5eaaf46
2023-08-24 19:21:10 +00:00
Spandan Das
e8a90c57e0 Handle proto.include_dirs for java
The proto_library(s) created for include_dirs will be added to
transitive_deps

This also fixes an existing bug for java_library containing .protos in
srcs via filegroups.
```
java_library {
  name: "foo",
  srcs: ["foo.proto", "foo_filegroup"],
}
```

At ToT, foo_filegroup was missing from the equivalent proto_library in
bp2build workspace.

Bug: 285140726
Test: allowlisted pandora-proto-java and built that
Change-Id: I2657d8cdef2e47434bc3e0d09a074c8e27299afc
2023-08-24 19:21:10 +00:00
Spandan Das
4ed3d120c9 Handle proto.include_dirs in bp2build for py
Followup to aosp/2711114 which added proto.include_dirs support for cc

Test: go test ./bp2build
Test: Added an integration test in build/bazel/examples
Bug: 285140726
Change-Id: Ic78dacbe46d9ea67e9441948852a3f94dabbb35e
2023-08-24 19:21:10 +00:00
Spandan Das
4e5a194b90 Add proto.local_include_dirs support in bp2build
This is a followup to aosp/2711093 which added support for
proto.include_dirs. local_include_dirs is simlar, except that is
relative to the module directory.

Test: go test ./bp2build
Bug: 285140726
Change-Id: I32ddc7371048672d6935f827c8aee9d767305e2c
2023-08-24 19:00:12 +00:00
Spandan Das
e0f2ed56a0 Add manual tag to proto_library at the root package
This is a fix similar to aosp/2707793. This adds manual tags to the
top-level proto_library created in the root package, plus any
dynamically created proto_library targets for proto.include_dirs. These
proto_library targets might not specify their deps correctly and might
be unbuildable.

(We need to keep these targets because they provide a ProtoInfo for
cc/java/py source gen)

Test: go test ./bp2build
Change-Id: Ic00f05186327fcfcc8d33a0a2c0891ed619b7acb
2023-08-24 19:00:11 +00:00
Colin Cross
14e366fbec Merge "Fix adding manual ubsan runtime to static glibc binaries" into main am: 55e775f94f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2723481

Change-Id: I86d3347d88745832cce9f5fa83beba53aea7fdd0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 18:03:24 +00:00
Colin Cross
55e775f94f Merge "Fix adding manual ubsan runtime to static glibc binaries" into main 2023-08-24 17:11:47 +00:00
Cole Faust
39b614af17 Add the system image test to the bazel sandwich
Also make -test.sh files executable, while we wait for a bazel update
that will tell us which FileWrite actions should be executable.

Bug: 297268692
Test: m bazel_sandwich
Change-Id: I60498577ba12813bff8bbdbc1b997ea4addefd17
2023-08-24 09:47:35 -07:00
Jason Wu
acb158233c Merge "bp2build converter for sh_test followup" into main am: 66de6c445f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2700335

Change-Id: Id60ac362bee705a8078130d18381696d7edd782e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 16:05:41 +00:00
Jason Wu
66de6c445f Merge "bp2build converter for sh_test followup" into main 2023-08-24 15:19:28 +00:00
James Farrell
4979ed83d1 Merge "Temporarily disable python precompilation for py3.11" into main am: c36312a64d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2722593

Change-Id: I8223e261e5ad8ac9727ad8a7fd0a2f01da1ae8be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 14:47:10 +00:00
James Farrell
c36312a64d Merge "Temporarily disable python precompilation for py3.11" into main 2023-08-24 14:13:10 +00:00
Vinh Tran
4bb0237336 Export RustDefaultVersion to Bazel am: 80f6b2147f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2724373

Change-Id: If989d9cdcbc277e70e6dd694aa26f4716fc581fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 13:29:25 +00:00