Commit graph

365 commits

Author SHA1 Message Date
Yike Zhang
91ad7f2e91 Merge "Convert merge_annotation_zips_test to b test" into main 2023-08-02 03:52:57 +00:00
Yu Liu
7cd9280bc1 Merge "Remove the MixedBuildsDisabledList that is not used anywhere." into main 2023-08-02 03:25:55 +00:00
Treehugger Robot
da798aa8fc Merge "Add some dirs to bp2build allowlist" into main 2023-08-02 01:56:17 +00:00
Spandan Das
390a6d69a0 Add some dirs to bp2build allowlist
This dir contains some modules which are transitive deps of some modules
in internal

Bug: 292281173
Test: TH
Change-Id: I8901d8a763697a8212eff0d14906d4151e01faed
2023-08-01 22:57:39 +00:00
yike
1aaeea39da Convert merge_annotation_zips_test to b test
Test: b test //frameworks/base/api:merge_annotation_zips_test
Bug: 293225210
Change-Id: Ia53b4168894b5c70c843ca315d963fa905ef582f
2023-08-01 18:57:59 +00:00
Jooyung Han
09195f4ffd Merge "Revert "Initial implementation of the bazel sandwich"" into main 2023-08-01 06:50:25 +00:00
Jooyung Han
c13fad8181 Revert "Initial implementation of the bazel sandwich"
Revert submission 2651299-bazel_sandwich

Reason for revert: b/293883239, checking if this breaks the build.

Reverted changes: /q/submissionid:2651299-bazel_sandwich

Change-Id: I5f1d4bb13d21e6599f5c353dcaba2375f5ec234d
2023-08-01 05:15:17 +00:00
Treehugger Robot
61a27f80cd Merge "Initial implementation of the bazel sandwich" into main 2023-07-31 23:00:55 +00:00
Cole Faust
a20d947329 Initial implementation of the bazel sandwich
The "bazel sandwich" is a mechanism for bazel to depend on make/soong
outputs. The name comes from the fact that bazel is now at the top
and bottom of the build graph. This is intended to allow us to work
on converting the partition builds to bazel while not all of the
dependencies of the partition have been converted.

It works by adding the bazel_sandwich_import_file rule, which emits a
dangling symlink that starts with bazel_sandwich:, and includes
information that the aquery handler in soong reads. The aquery handler
rewrites the symlink so that it points to a file generated by
make/soong, and adds a ninja dependency from the symlink to the file
it's targeting.

This allows us to depend on make-built files from bazel, but notably
it doesn't allow us to depend on analysis-time information from make.
This shouldn't be a problem for the partitions, but limits the use of
the bazel sandwich to similar, less complicated types of builds.

go/roboleaf-bazel-sandwich

Bug: 265127181
Test: m bazel_sandwich
Change-Id: Ic41bae7be0b55f251d04a6a95f846c50ce897adc
2023-07-31 11:53:41 -07:00
Vinh Tran
a851ba0627 Revert "Allowlist build files in rules_python"
Revert submission 2678115-reroute-rules_python

Reason for revert: manifest for path external/bazelbuild-rules_python doesn't exist in some branches causing CI breakage.

Reverted changes: /q/submissionid:2678115-reroute-rules_python

Change-Id: I4622aea91e477b6a9dfa5dd44829245b4dfabbe6
2023-07-28 16:07:32 +00:00
Cole Faust
9b7a0e7084 Allowlist build files in rules_python
Test: m nothing
Bug: b/200202912
Change-Id: I4dc285824b6672355078679b7a036bad94108e5e
2023-07-27 18:45:02 +00:00
Chris Parsons
c149e81e0f Denylist new libart modules
These new modules were created in aosp/2638970. They have unconverted
dependencies (like their originating module, libart), and thus need to be
denylisted so that bp2build continues to build.

Fixes: 293295490
Test: Manually built broken package with `b`
Test: Treehugger

Change-Id: I3542d16c19d179193660767c91a59221854b7889
2023-07-26 18:57:38 +00:00
Trevor Radcliffe
ed83eba40f Merge "Revert "Revert "add media.swcodec to Bazel prod allowlist""" into main 2023-07-26 14:55:14 +00:00
Yu Liu
493c76b731 Remove the MixedBuildsDisabledList that is not used anywhere.
Bug: None
Test: CI
Change-Id: Iaea443f9848764bb2995055e1a5e5386dcadd012
2023-07-24 23:37:10 +00:00
Yu Liu
41a58a97ae Allowlist the newly added libcodec2_hal_common.
Bug: 292568369
Test: CI
Change-Id: I5847b1c7530573cd7166bd0130d2b47c63cb9d90
2023-07-24 23:31:48 +00:00
Treehugger Robot
8db771d201 Merge "Allowlist hal_unit_tests and deps" into main 2023-07-24 17:53:27 +00:00
Romain Jobredeaux
8505190672 Merge "Allowlist ModuleMetadata" into main 2023-07-24 14:48:28 +00:00
Treehugger Robot
cc8c8e5f8d Merge "Allowlist additional deps of inputflinger" into main 2023-07-21 21:03:39 +00:00
Zi Wang
8348ce92f5 Merge "java_test macro needs srcs and deps to create .jar for tradefed_test_suite" into main 2023-07-21 20:48:13 +00:00
Spandan Das
0766b4fe52 Allowlist hal_unit_tests and deps
`hal_unit_tests` is a host cc test.

Bug: 291654541
Test: b test //system/chre:hal_unit_tests
Change-Id: I1e5cbdc42a06186dc522cf53b3b2a3695147e5de
2023-07-21 17:25:31 +00:00
Yu Liu
4c9b3e114b Merge "denylist boringssl_test_support before we fully support cc_test_library" into main 2023-07-20 04:16:22 +00:00
Yu Liu
1d03d176a9 denylist boringssl_test_support before we fully support cc_test_library
Bug: 291962016
Test: CI
Change-Id: I20596fe3f70d0a27b12b39a288df753c0befb891
2023-07-19 23:39:41 +00:00
Romain Jobredeaux
0ccd94cefa Merge "Keep rules_java vendored repository BUILD files" into main 2023-07-19 23:22:11 +00:00
Romain Jobredeaux
01e6b2c788 Keep rules_java vendored repository BUILD files
Test: CI
Bug: 291828210
Bug: 287596254
Change-Id: Ic8a3a1966cc82816b74f0efe59c27fae70552c11
2023-07-19 15:27:13 -04:00
Zi Wang
7873f613c4 java_test macro needs srcs and deps to create .jar for tradefed_test_suite
Test: java_test_host_conversion_test.go and TH

Bug: 280452825
Change-Id: Ibf0c7eed415fc58a4d228f0347ab125fdc4466e4
2023-07-17 16:39:07 -07:00
Romain Jobredeaux
039fc06a5b Allowlist ModuleMetadata
Test: builds locally + CI
Bug: 290770463
Change-Id: Ib36d1ae1a7f71716cb1703e5cdf0d5b45904fca4
2023-07-17 12:09:09 -04:00
Liz Kammer
b492843c3f Handle static binary repetition of system deps
Test: b build `bmod toybox-static`
Test: go test bp2build tests
Change-Id: Id728f6fd08832a4fc153f0ff5282cdfb6b19c2f6
2023-07-10 10:28:02 -04:00
Trevor Radcliffe
e3c6a296cf Revert "Revert "add media.swcodec to Bazel prod allowlist""
This reverts commit 061012475c.

Reason for revert:
Debugging the failures from the previous attempt

Change-Id: Ide7161ca46fd3bac087e976712e07ddeecf6335e
2023-07-07 19:29:04 +00:00
Jingwen Chen
661b2ee719 Merge "Revert "add media.swcodec to Bazel prod allowlist"" 2023-06-30 04:23:40 +00:00
Trevor Radcliffe
061012475c Revert "add media.swcodec to Bazel prod allowlist"
This reverts commit b1274236e8.

Reason for revert: 
b/289418267

Change-Id: I0a94675e09a82b55d62e58dbeea0d3186c754ed3
2023-06-29 22:30:18 +00:00
Trevor Radcliffe
cae9c84a56 Merge "add media.swcodec to Bazel prod allowlist" 2023-06-29 16:26:11 +00:00
Liz Kammer
e848bb2c51 Allowlist additional deps of inputflinger
Test: bp2build.sh
Change-Id: Ie6a750f5ef28e9380a6d01ea68daeeb7244da805
2023-06-29 09:21:50 -04:00
Yu Liu
b1274236e8 add media.swcodec to Bazel prod allowlist
Bug: 280339074
Test: CI
Change-Id: I56b858dbd95a85221440c020afd1eb1530c1a467
2023-06-27 00:15:06 +00:00
Treehugger Robot
7376815e21 Merge "Handle no generated headers and exporting for xsd" 2023-06-26 21:20:46 +00:00
Treehugger Robot
3da9587eda Merge changes from topic "revert-2637031-revert-2626204-rules_go_repo-OSFOZKENFO-KSSEOFEKLG"
* changes:
  Revert^2 "Symlink external/bazelbuild-rules_go in mock tests"
  Revert^2 "Always use the BUILD files from bazelbuild-rules_go"
2023-06-26 08:01:19 +00:00
Spandan Das
4a5bc5c587 Revert^2 "Always use the BUILD files from bazelbuild-rules_go"
51eee74a02

Change-Id: I86f2d4bb1e336c72a9c89e67598db8a1bdea6a2c
2023-06-26 03:44:04 +00:00
Liz Kammer
084d6a908f Handle no generated headers and exporting for xsd
Test: new bp2build unit tests
Test: build libvintf
Change-Id: I2c7bf409b30d78fcf6762d69139e3249a2b0d368
2023-06-23 15:48:16 -04:00
Matthias Männich
2424ae6e39 Merge changes from topic "revert-2626204-rules_go_repo-OSFOZKENFO"
* changes:
  Revert "Always use the BUILD files from bazelbuild-rules_go"
  Revert "Symlink external/bazelbuild-rules_go in mock tests"
2023-06-23 07:55:32 +00:00
Matthias Männich
51eee74a02 Revert "Always use the BUILD files from bazelbuild-rules_go"
Revert submission 2626204-rules_go_repo

Reason for revert: breaks the aosp_kernel-build-tools (https://ci.android.com/builds/branches/aosp_kernel-build-tools/grid)
Reverted changes: /q/submissionid:2626204-rules_go_repo

Change-Id: I912050a50313fe6a951f675664035857d89c0194
2023-06-23 07:45:26 +00:00
Treehugger Robot
896c6b09dc Merge changes from topic "rules_go_repo"
* changes:
  Symlink external/bazelbuild-rules_go in mock tests
  Always use the BUILD files from bazelbuild-rules_go
2023-06-22 23:54:44 +00:00
Alix
e266787aed bp2build conversion for rscript srcs in cc modules
Bazel does not support using .rscrip/.fs files as cc srcs.
For a module foo with foo srcs, Bp2build will create a bazel
target of rule class rscript_to_cpp with name foo_renderscript
which will have only the renderscript files as srcs.
Bp2build will also create a target foo with the expected cc rule class.
The foo target will have all other src files as srcs and will also
have the target foo_renderscript as another src.

Bug: 210509914
Test: bp2build testing & b build target rstest-latency
Change-Id: Ifdc55051a3595f5fcf54eab8b59e11e9351e141c
2023-06-21 14:58:10 +00:00
Usta (Tsering) Shrestha
1205d717cb Disallow java_test_host dependant
Bug: 287462798
Change-Id: I98cc7c9bb1d9fbaf3211284c02c85e0037e2059c
Test: ABTD run
2023-06-20 19:08:45 +00:00
Spandan Das
7bdea7e56d Always use the BUILD files from bazelbuild-rules_go
This repository contains the core go rules

Test: TH
Bug: 284483729
Change-Id: I4385c84140f2e41bfa5e5cd5434a212c138f456a
2023-06-16 17:16:43 +00:00
Cole Faust
6cac8cbb26 Add implementation whole archive deps to binaries
...as regular whole archive deps because binaries don't have
implementation whole archive deps.

Also allowlist checkpolicy which requires this change.

Test: bp2build presubmits should now build checkpolicy
Change-Id: I1f98312da249ea1f37004ccba8799449bdbc4718
2023-06-15 15:01:30 -07:00
Jingwen Chen
a1a17759e1 Fix bp2build breakage by denylisting //system/apex/libs/libapexsupport/...
Added in
https://android-review.git.corp.google.com/c/platform/system/apex/+/2623829/,
but the modules depend on rust_* modules.

Test: bp2build-incremental presubmit
Change-Id: I229a2442e1b8a89ab768b54dfa713a8b97908436
2023-06-15 11:07:39 +00:00
Jason Wu
5d5a3bb963 denylist logcat to pass bp2build-incremental
Bug: 286488545
Test: bp2build.sh
Change-Id: I0940b833c6bf4f9f3780293684a6c64c0c72e32f
2023-06-14 13:26:35 -04:00
Jason Wu
ee51c54888 denylist new modules that have implicit proto deps
Bug: 286488545
Test: bp2build.sh
Change-Id: I44c5d4a407aff2cb3123b5ba7e0f0faca5bb2abc
2023-06-13 15:44:44 -04:00
Sam Delmerico
96c1550ddf disable new modules in //art/runtime
Change-Id: Idecab7b34ef4a03870ce88c314fceaa1aa597338
2023-06-13 09:16:18 -04:00
Sam Delmerico
a8a1086c87 denylist new modules that have implicit proto deps
Bug: 286488545
Bug: 246997908
Test: b build //external/protobuf/...
Change-Id: I5338e7d30b68b8e35957189f45933008216e9331
2023-06-12 14:37:56 -04:00
Chris Parsons
8152a94816 Read BUILD files in bp2build
The parsed BUILD files will be scanned for obvious definitions of BUILD
targets which have Android.bp counterparts. In such cases, bp2build will
automatically omit conversion of these defined modules (to prevent
collisions). With this change, we no longer need one-off denylisting of
modules which have BUILD file definitions.

This has a 0.03s to 0.2s slowdown for bp2build with current state. This
impact is identical on a heavier test branch, as well. I also ran an
experiment that applied BUILD scanning to all source BUILD files
(regardless of allowlisting), and this had a 2 second slowdown.

We may want to look into parallelizing or improving the performance of
this evaluation, but it's probably not worth the effort at this time,
since the current performance hit is small.

Test: New integration test
Test: Removed libprotobuf-python from denylist and tested building the
package
Test: Treehugger

Change-Id: Ibde3bab12cd4a8fed642ad46e5344a56953bec91
2023-06-09 16:02:40 +00:00