Commit graph

58164 commits

Author SHA1 Message Date
Liz Kammer
1c92116e78 Allowlist unblocked modules
Test: b build //...
Change-Id: I2050f413b42e194555863759e230356c723dd07e
2022-08-29 09:55:21 -04: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
Cole Faust
5fa4e961fb bp2build support for instruction_set
Convert `instruction_set: "arm"` to an
"arm_isa_arm" bazel feature.

Bug: 215719349
Test: go tests
Change-Id: Ib976d23d2a57e8c0ab5d83ec994a0b7f3c69a7fe
2022-08-26 10:13:34 -07:00
Wei Li
537112c693 Merge "Add bp2build converter for cc library stubs and use the stub library target of a library while linking it in APEXs." 2022-08-26 16:06:19 +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
1fa2672be9 add bp2build unit tests for aidl_interface
Bug: 229251008
Test: go test ./bp2build -run TestAidlInterface
Change-Id: Ie7214d5578bc21e348410ca91ea42d7a3190eb3d
2022-08-25 14:47:41 -04: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
Sam Delmerico
c1130dc721 add Partition method to LabelListAttribute
It can be tedious to split a LabelListAttribute on all of the
configuration axes, so LabelListAttribute.Partition can be used to do
this based on a predicate function.

Test: go test ./bazel
Change-Id: I78ff8c24ce9c86bab5896290d8afe979d56545b6
2022-08-25 14:47:30 -04:00
Cole Faust
f273470a40 Merge "Skip errorprone on protobuf/aidl-only modules" 2022-08-25 16:49:49 +00:00
Treehugger Robot
d3ae6af309 Merge "rustc-1.63.0 Build 8951290" 2022-08-24 23:20:40 +00:00
Jihoon Kang
e693018639 Merge "Resolve escaping error in genrules sources with $" 2022-08-24 22:57:32 +00:00
Jihoon Kang
c170af4e5b Resolve escaping error in genrules sources with $
'$' cannot be included in the genrule source file name as it is an
invalid character.
One workaround to include a file with '$' in the filename is to use
glob(*) and match pattern.
However, shell currently evaluates the '$' sign and leads to unexpected behavior.
This change fixes the issue by shell-escaping the filepath in generating
build actions.

Test: m
Bug: b/194980152
Change-Id: I6fd919c568b5b6526e4de5155104a08ecadab307
2022-08-24 19:06:49 +00:00
Cole Faust
2d516dfa53 Skip errorprone on protobuf/aidl-only modules
Some protobuf modules like perfetto_trace-full take a long time
to analyze with errorprone, in that case it took over 10 minutes.
Skip errorprone on protobuf or aidl-only modules because having
warnings on generated source code isn't useful anyways.

Bug: 242630963
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I5e73accd0b56a0a71e75927778c5c04a0d358e67
2022-08-24 11:22:52 -07:00
Chris Wailes
af1e89e07b rustc-1.63.0 Build 8951290
Bug: https://issuetracker.google.com/issues/241303140
Test: m rust
Change-Id: Ie641a90154d5c3b9cedf671901116f68e5e47edb
2022-08-24 10:04:40 -07:00
Zhenhuang Wang
5e7c4756b5 Merge "Add a new test_options.tags attribute to customize test execution" 2022-08-24 02:14:02 +00:00
Jihoon Kang
9f4f8a3cc7 Copy soong variables to dist
Per aosp/2183398, out/soong/soong.variables provide some useful information for debugging purpose.
This change enables copying out/soong/soong.variables to out/dist/soong_ui/soong/soong.variables in dist mode, similar to build.ninja.gz in the same directory.
Test confirmed that the content of the out/soong/soong.variables is
equal to that of out/dist/soong_ui/soong/soong.variables.

Test: m dist $target &&
	diff out/soong/soong.variables out/dist/soong_ui/soong/soong.variables
Change-Id: I1bfa53a8e116c49fda2cc9a7252f4da0c59ce5b5
2022-08-23 21:37:48 +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
Yi Kong
b1a9aab987 Merge "Revert "Reland "Turn on Global ThinLTO by default""" 2022-08-23 11:36:02 +00:00
Yi Kong
7689c64f68 Revert "Reland "Turn on Global ThinLTO by default""
This reverts commit 4273c18a4f.

Bug: 243475788
Bug: 243490273
Change-Id: I5ea8c8e6a84408013bc7ed573776d8f5eebc091f
2022-08-23 09:24:48 +00:00
Treehugger Robot
8cab5906da Merge "Reland "Turn on Global ThinLTO by default"" 2022-08-23 00:47:28 +00:00
Jihoon Kang
f171dac47e Merge "Remove unnecessary lunch output" 2022-08-22 21:44:25 +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
Christopher Parsons
6ffb2fb7e1 Merge "Retrieve shared lib output from custom provider" 2022-08-22 20:40:01 +00:00
Trevor Radcliffe
218dae74b1 Merge "Reexport whole_static_libs in cc_library_headers" 2022-08-22 20:39:08 +00:00
Dan Albert
237d1710f9 Merge "Drop support for KitKat." 2022-08-22 18:53:48 +00:00
Treehugger Robot
02b122c887 Merge "Strip annotations from copy of core-current-stubs-for-system-modules" 2022-08-22 14:33:38 +00:00
Yi Kong
4273c18a4f Reland "Turn on Global ThinLTO by default"
This reverts commit b90ff82772.

All the breakages are now fixed or mitigated.

Bug: 169004486
Change-Id: Ibec4b1f0a50c5ef6769bc6916a81721a4ce03c60
Test: presubmit
2022-08-22 08:18:03 +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
Pierre-Clément Tosi
329a03196f Merge "Support prefix_symbols for prebuilt libraries" 2022-08-22 07:44:42 +00:00
Sorin Basca
bdbae604b0 Strip annotations from copy of core-current-stubs-for-system-modules
Bug: 233029164
Test: m
Change-Id: I4d497b1072d1184cf3dce660992632eb01f4016d
2022-08-22 08:10:16 +01:00
Treehugger Robot
f5b0c2a178 Merge "Fix bugs from cc_api_library build" 2022-08-22 02:28:53 +00:00
Hsin-Yi Chen
49542c8541 Merge "Revert "Disable RBE for header-abi-dumper"" 2022-08-22 02:16:04 +00:00
Paul Duffin
ff2768d28a Merge "Add current build release" 2022-08-21 12:15:48 +00:00
Paul Duffin
1caaec0789 Merge "Add hidden API properties to java_sdk_library modules" 2022-08-21 12:00:14 +00:00
Yi Kong
11f4a795ba Merge "Do not enable ThinLTO for CFI enabled projects" 2022-08-20 05:10:04 +00:00
Usta Shrestha
96f2534761 Merge "SOONG_NINJA_ARGS to pass ninja args to soong_ui" 2022-08-20 00:42:48 +00:00
Treehugger Robot
12bd7c7538 Merge "#apex symbols no longer contribute to platform libraries" 2022-08-19 23:55:00 +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
Usta Shrestha
8dc8b0a065 SOONG_NINJA_ARGS to pass ninja args to soong_ui
Cf soong_build, allow soong_ui to support additional
ninja arguments

Test: NINJA_ARGS='-d explain' nothing
Bug: N/A
Change-Id: I42827fb817bed432251e9b0b94b15a4f6f78cb03
2022-08-19 20:41:56 +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
Paul Duffin
42a49f1278 Add current build release
Previously, the build releases only included named releases so did not
have a way to represent the latest build release. This adds the current
build release (named after the current API level) to represent that.

Bug: 240406019
Test: m nothing
Change-Id: Ib8336da716b447448b23bc9684ce3be1ab78648a
2022-08-19 17:39:49 +00:00