Commit graph

4662 commits

Author SHA1 Message Date
Treehugger Robot
bf24d20f1e Merge "Allowlist unblocked modules" 2022-08-30 15:55:43 +00:00
Christopher Parsons
3d31a12867 Merge "Add --bazel-mode and --bazel-mode-dev" 2022-08-30 14:29:30 +00:00
Treehugger Robot
fb9ca5c7e2 Merge "Allowlist speex and audio_utils" 2022-08-29 19:20:31 +00:00
Treehugger Robot
94bc338bf3 Merge "Allowlist libyuv" 2022-08-29 19:15:53 +00:00
Chris Parsons
ef615e5841 Add --bazel-mode and --bazel-mode-dev
This allows "bazel mixed builds prod mode", in additional to reworking
the mechanism in which mixed builds dev mode is enabled.

As a followup, CI scripts will be migrated to use the new flags, as
USE_BAZEL_ANALYSIS=1 is deprecated.

Test: Manually ran --bazel-mode with an allowlist verifying that the
module alone was enabled
Test: Manually verified --bazel-mode and --bazel-mode-dev cause a build
failure

Change-Id: If0d34360e60452f428b05828f4ec7596b7cb619a
2022-08-29 10:56:04 -04:00
Liz Kammer
1c92116e78 Allowlist unblocked modules
Test: b build //...
Change-Id: I2050f413b42e194555863759e230356c723dd07e
2022-08-29 09:55:21 -04:00
Cole Faust
fe2ab36371 Allowlist speex and audio_utils
They're dependencies of media.swcodec

Bug: 237041122
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I93cb8b0be707d62edf15f0326d901d0251ccb232
2022-08-27 20:44:40 -07:00
Cole Faust
92e92e49ca Allowlist libyuv
It's a dependency of media.swcodec

Bug: 237041122
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I17e512af7c0d7d9ded7311ad61cd339b380fbef0
2022-08-26 16:12:42 -07:00
Vinh Tran
9f6796ab17 Convert cc library with AIDL to cc_aidl_library
Change-Id: I1056b37cf09f4341bf2c2545c9069dbe49ea5ab3
Test: USE_BAZEL_ANALYSIS=1 m libbinder
Bug: 243010121
Fix: 243015050
2022-08-26 16:21:53 -04:00
Sam Delmerico
939653e34e Merge "add bazel AIDL examples to bp2build" 2022-08-26 20:07:58 +00:00
Sam Delmerico
3be24727ce Merge changes from topic "aidl_interface_bp2build"
* changes:
  add bp2build unit tests for aidl_interface
  AIDL source generation accounts for Bazel paths
  convert .aidl srcs for java_library
  add Partition method to LabelListAttribute
2022-08-26 20:07:58 +00:00
Wei Li
81852ca9ac Add bp2build converter for cc library stubs and use the stub library target of a library while linking it in APEXs.
Bug: 231322789
Test: with this CL on internal master,
1) b build --verbose_failures //vendor/google/modules/AdbdGoogle:com.google.android.adbd --config=android_x86_64
2) adb install bazel-bin/vendor/google/modules/AdbdGoogle/com.google.android.adbd.apex, and adbd is activated successfully on cuttlefish device.
3) m mts && mts-tradefed run mts-adbd, and there is no failure with cuttlefish device
4) packages/modules/adb/test_device.py, and there is no failure with cuttlefish device.

Change-Id: I81b6f5336cacf35c68957ae2dac65f985b6eafb9
2022-08-25 13:28:40 -07:00
Sam Delmerico
2351eacb19 AIDL source generation accounts for Bazel paths
The AIDL source generation rule sets include flags based on the relative
path of .aidl sources. For .aidl sources provided by Bazel targets, e.g.
in a filegroup, the same directory could be added to the include path
twice. Instead we need to ensure that if a Bazel source provides the
include path, that we don't add it again from a Soong source.

Bug: 229251008
Test: USE_BAZEL_ANALYSIS=1 m api-stubs-docs-non-updatable
Change-Id: I4997039003242b43e0e52ccf41729acb4ad11324
2022-08-25 14:47:41 -04:00
Sam Delmerico
97bd127457 convert .aidl srcs for java_library
Test: go test ./bp2build
Test: b build //frameworks/base/services/tests/servicestests/aidl:servicestests-aidl
Test: enable //packages/modules/NetworkStack/common/networkstackclient
    && disable restriction on Android SDK in javaLibraryBp2Build
    && b build //packages/modules/NetworkStack/common/networkstackclient:ipmemorystore-aidl-interfaces-V10-java
Change-Id: Ifb817daf09a3983ea1c84948ed9f02a79f95784b
2022-08-25 14:47:41 -04:00
Zhenhuang Wang
5e7c4756b5 Merge "Add a new test_options.tags attribute to customize test execution" 2022-08-24 02:14:02 +00:00
Treehugger Robot
4673d18144 Merge "disable kotlin java_imports for mixed builds" 2022-08-23 21:28:07 +00:00
Sam Delmerico
0b66fb28e6 disable kotlin java_imports for mixed builds
These Kotlin JARs contain class files under the META-INF directory that
are incorrectly parsed in gen_jarjar.py causing the Jarjar tool to error.

Bug: 243098369
Bug: 217750501
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I62aaf086dc91d868a8d653f7fdb2c111bdc96097
2022-08-23 15:27:56 -04:00
Christopher Parsons
5a2a4814af Merge "Refactor mixed build allowlist handling" 2022-08-23 17:21:16 +00:00
Chris Parsons
ad876010fe Refactor mixed build allowlist handling
This refactoring prepares for introduction of bazel prod mode, an
alternative mechanism for mixed builds allowlist handling.

 * Decide bazel-mode as close to soong_build main as possible
 * BazelContext itself decides whether a module is allowlisted
 * Separate bp2build and mixed build allowlist

Test: m nothing, manually verified all modules are mixed build disabled
(via metrics)
Test: USE_BAZEL_ANALYSIS=1 m nothing, manually verified that mixed build
disabled/enabled modules are identical before and after change.

Change-Id: I0f55d8b85000cb4a871a099edc6d7d868d7df509
2022-08-23 13:15:12 -04:00
Treehugger Robot
e773613367 Merge "Make FirstTarget treat HostCross separately from Host" 2022-08-23 14:14:45 +00:00
Colin Cross
c0f0eb86db Make FirstTarget treat HostCross separately from Host
Use Target.Os and Target.HostCross as the key in FirstTarget so that
it returns a separate target for host and host cross architectures.
This is useful when host and host cross are both linux_musl, but
host cross is an independenct architecture like arm64.

Also filter the targets returned by ctx.MultiTargets() to match
the HostCross value of ctx.Target() to prevent the newly created
HostCross variants from colliding with Host variants in JNI or
test data attached to Java targets using a common arch.

This relands If75790001afe9d0f9d4d8166f207847851812297 with the
addition of the ctx.MultiTargets() filtering.

Bug: 236052820
Test: TestArchMutator
Change-Id: Ia6fe1185915d174d0ad6b401c227e0e57bee5c24
2022-08-22 14:36:13 -07:00
Dan Albert
237d1710f9 Merge "Drop support for KitKat." 2022-08-22 18:53:48 +00:00
Zhenhuang Wang
409d27712f Add a new test_options.tags attribute to customize test execution
The `test_options.tags` attribute provides additional metadata to
customize test execution by downstream test runners. The tags have no
special meaning to Soong.

Bug: 240928948
Test: manually add `test_options.tags` attribute and run:
    $ refreshmod && \
      cat out/target/product/generic/module-info.json |\
      grep <tags>
Change-Id: I35267f6608e48c6184e56530ef128d93b2f97522
2022-08-22 08:16:17 +00:00
Dan Albert
6bfb6bbde4 Drop support for KitKat.
The NDK is dropping support for this.

Bug: https://github.com/android/ndk/issues/1751
Test: treehugger
Change-Id: I6c03dfc364e7612ce4f45fb58746726983cf5b74
2022-08-19 20:56:28 +00:00
Treehugger Robot
b605679440 Merge "Bluetooth available hack" 2022-08-19 20:54:17 +00:00
Vinh Tran
88b3ba2ae2 Merge "Convert filegroup with AIDL srcs to aidl_library" 2022-08-19 20:36:10 +00:00
Cole Faust
370b37e053 Merge "Bp2build support for runtime_libs" 2022-08-19 20:09:56 +00:00
Treehugger Robot
845c4c1646 Merge "Fix ProcessBazelQueryResponse of filegroup" 2022-08-19 17:16:58 +00:00
William Escande
2ad6e84d60 Bluetooth available hack
The first hack has been introduced to facilitate the creation of the
com.android.btservices apex without the need to upload 100+ cl close to
the release date.
We now want to delete com.android.bluetooth apex and replace all the
apex_available rules to target the new apex name
It will be way much easier to do this in separate CL and without forcing
us into a single topic.

Bug: 243054261
Test: Build
Change-Id: Ia03698db839db4684871eb38c088f88d6bdcba4b
2022-08-18 13:34:22 -07:00
Vinh Tran
444154d5d3 Convert filegroup with AIDL srcs to aidl_library
Change-Id: I94c185744a86c812dc48e30b66e060361b9161cb
Test: USE_BAZEL_ANALYSIS=1 m libbinder
Test: USE_BAZEL_ANALYSIS=1 m module-lib-api-stubs-docs-non-updatable
Bug: 243010121
2022-08-18 14:01:15 -04:00
Vinh Tran
16fe8e1cf1 Fix ProcessBazelQueryResponse of filegroup
In mixed builds currently, filegroup doesn't use path prop when creating the paths to the srcs. It defaults to ModuleDir.

Hence, when java.genAidlIncludeFlags [1] calls srcFile.Rel() to eventually create the AIDL include dir for AIDL flags, srcFile.Rel() returns the filepath relative to the module directory instead. This CL appends path prop to module dir when creating relativeRoot.

This fixes the bridge between converted filegroup that set path prop (e.g. libbinder_aidl) to unconverted module (for example, droidstubs). The fix is needed for the child CL aosp/2186599 to convert libbinder_aidl to Bazel. Without this fix, module-lib-api-stubs-docs-non-updatable (unconverted module that depends on libbinder_aidl) can't be built in mixed builds.

[1]: https://cs.android.com/android/platform/superproject/+/master:build/soong/java/gen.go;l=123?q=java%2Fgen.go

Test: go test
Bug: 243010121
Change-Id: Ic2dd2ab9199c62010303a5b8c611d722f4a4118d
2022-08-18 13:59:06 -04:00
Cole Faust
6b29f593ea Bp2build support for runtime_libs
Bug: 213201180
Test: Updated the minimal apex in the build/bazel cl to include runtime_libs so the apex diff test will test it
Change-Id: I10add1895cfa122a370d24196a33ec2dcfafccfc
2022-08-17 15:20:17 -07:00
Colin Cross
d079e0b270 Reformat build/soong for go 1.19
Test: none
Change-Id: I132368f0fcbdb5ea088b5b84dbe4ccfdd9e94cad
2022-08-17 10:43:13 -07:00
Zhenhuang Wang
852d0c4859 Merge "Move common test_options properties into the android package" 2022-08-17 15:22:18 +00:00
Jingwen Chen
b2f584ba58 bp2build: allowlist frameworks/av/media/liberror/... and denylist broken targets.
New target from AOSP 13 drop.

Test: bp2build.sh
Change-Id: Ica819c5c5c42b52ce11514f146e09065f9690e9b
2022-08-17 10:51:27 +00:00
Xin Li
6ef4fae229 Merge "DO NOT MERGE - Merge Android 13" 2022-08-16 19:08:20 +00:00
Zhenhuang Wang
0ac5a431a9 Move common test_options properties into the android package
Multiple modules (e.g. java, cc, python, rust) define the `test_options`
field. Extract the common properties in test_options to share across
different test rules.

Bug: 240928948
Test: `refreshmod` and diff with original module-info.json
Change-Id: I404a7a157b4ccaa53d800ee2217559ff695bd825
2022-08-17 01:19:15 +08:00
Yu Liu
ae7fe1697c Merge "Re-enable the base hidl modules in mixed build." 2022-08-16 17:15:31 +00:00
Treehugger Robot
6b56c375a1 Merge "CpExecutable should not preserve symlink" am: 90fbcf1c29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2182362

Change-Id: I70637ef2695cadd5faad9ccb04e570d905896c8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 03:22:02 +00:00
Chih-Hung Hsieh
1048a73f21 CpExecutable should not preserve symlink
* When copy to an $out file, a symlink can become a dangling link.
* The following chmod +x will fail with a dangling link.

Bug: 241815504
Test: presubmit builds
Change-Id: Ic3dd9d41376a94381981fb973b41a1650f5ac946
2022-08-16 01:03:10 +00:00
Yu Liu
6175e15807 Re-enable the base hidl modules in mixed build.
b/242220039 is resolved.

Bug: 232520859
Test: Run mixed_droid locally,
Change-Id: I63462bd1bb763eefec4c1665514b38c32bdd80a5
2022-08-15 21:29:57 +00:00
Sam Delmerico
02626f9365 add bazel AIDL examples to bp2build
Bug: 229251008
Test: b build //build/bazel/examples/aidl:example-aidl-test
Change-Id: I91ac8562c431bdb0378068695d8acd4a8c65d57f
2022-08-15 15:49:00 -04:00
Treehugger Robot
938a51225c Merge "Move bp2build progress proto to soong." am: c2cb917659
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2185656

Change-Id: Ie4881ba06b4beed56935e09817f9c6d882fb31e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-15 16:49:03 +00:00
Treehugger Robot
c2cb917659 Merge "Move bp2build progress proto to soong." 2022-08-15 16:43:35 +00:00
Treehugger Robot
a84b1b6815 Merge "Add mainline dev certificate dir to config" am: e0ac9f74a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2185477

Change-Id: I0014fd54a432a0a8054c953711ac5fadf54fdd54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-15 11:25:19 +00:00
Treehugger Robot
e0ac9f74a6 Merge "Add mainline dev certificate dir to config" 2022-08-15 11:04:14 +00:00
Christopher Parsons
e8225a6dde Merge "Write cquery.out even without error" am: d00b562939
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2183876

Change-Id: I9973b4c4bd79bd5c02c99da0665da6301ac24793
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 22:54:22 +00:00
Christopher Parsons
d00b562939 Merge "Write cquery.out even without error" 2022-08-12 22:33:37 +00:00
Yu Liu
72f3ff39ec Merge "Disable the base hidl modules in mixed build." am: fa044e79dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2185715

Change-Id: I13be84e7f8853635b7074ad43671791703bb03c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-12 21:37:42 +00:00
Yu Liu
fa044e79dd Merge "Disable the base hidl modules in mixed build." 2022-08-12 21:15:50 +00:00