Commit graph

72212 commits

Author SHA1 Message Date
usta
15ab550d04 Shard Javac
Test: m nothing
Test: allowlist frameworks/opt/calendar to bp2build convert
Test: add `javac_shard_size: 2` to calendar-common
Test: b //frameworks/opt/calendar:calendar-common
Bug: 297356812
Change-Id: Ie22bcf04946f3945952a74a46772b777b1522b70
2023-10-18 13:25:55 -04:00
Treehugger Robot
a815d9bf79 Merge changes from topic "import-sdk-version-none" into main
* changes:
  Do not convert sdk_version: "none"
  Don't use java_library for java_import neverlink
2023-10-18 17:17:59 +00:00
Treehugger Robot
6b4fb160ea Merge "Remove a number of entries from module denylist" into main 2023-10-18 17:16:02 +00:00
Usta (Tsering) Shrestha
d7471ec5cc Merge "Remove unsued mutator registration" into main 2023-10-18 15:33:30 +00:00
Liz Kammer
a855f73f4a Merge changes Iceb0b68f,I04865414 into main
* changes:
  Improve error message readability
  Share constants for droidstubs btw Soong & Bazel
2023-10-18 14:19:30 +00:00
Yi Kong
c1545e8dbf Merge "Add additional flag required for Flow Sensitive AFDO" into main 2023-10-18 07:04:06 +00:00
Vinh Tran
c6d992e483 Merge "Allowlist rustc-demangle crate" into main 2023-10-18 00:09:41 +00:00
Aditya Kumar
b36eaa663b Revert "Enable hot cold split"
This reverts commit 4e28d0eda2.

Reason for revert: Reverting now that we should have sufficient data from Crystalball https://b.corp.google.com/issues/306023954

Change-Id: I9f92c203eda309956ec192432ba0063eb11f59e2
2023-10-17 21:31:45 +00:00
Mateusz Cicheński
3106df7887 Merge "Revert "Add GENRULE_SANDBOXING=false to non-sandboxed builds"" into main 2023-10-17 21:04:56 +00:00
Colin Cross
95b53b83eb Export resource processor R.jar files to ASfP
Export the R.jar files generated by ResourceProcessorBusyBox to
module_bp_java_deps.json for use by Android Studio for Platform.

Bug: 305997998
Test: examine module_bp_java_deps.json
Change-Id: I48e3e28b45219646765de7848ec9dbe77d14c662
2023-10-17 13:21:02 -07:00
Jihoon Kang
1975d3e326 Disable from-text stub build for coverage build
Coverage builds depend on `native` properties for API elements, which
are not included in the API signature files and consequently in
from-text stubs. As no robust solution for handling this has been
planned out at the moment, from-text stub build is disabled for
coverage builds.

Per go/android-code-coverage-quickstart , Java code coverage is
enabled by the three environment variables: `EMMA_INSTRUMENT`,
`EMMA_INSTRUMENT_STAIC` and `EMMA_INSTRUMENT_FRAMEWORK`. This change
disables from-text stub build if any of the three variables are set
to true.

Test: go test ./java && m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing --build-from-text-stub and inspect ninja query to verify that the stub java library module depends on the from-source stub module
Bug: 304271961
Change-Id: Ie485c784145de6c253611e698354c4f9e4a30685
2023-10-17 20:00:12 +00:00
Usta (Tsering) Shrestha
543f8407ef Remove unsued mutator registration
Bug: 179313531
Change-Id: Ide9fc0a9e1275bb6303c8a3114ce1c4e98915f75
Test: m nothing
2023-10-17 19:20:55 +00:00
Treehugger Robot
697dfada6e Merge "Remove unused aquery structs" into main 2023-10-17 18:27:38 +00:00
Vinh Tran
89d2bbf188 Allowlist rustc-demangle crate
Test: b build //external/rust/crates/rustc-demangle
Test: b build //external/rust/crates/rustc-demangle --config=android
Bug: 297395183
Change-Id: I715377b4bdc296d9676beb0405cc0d544c7d96e9
2023-10-17 13:59:05 -04:00
Mateusz Cicheński
f119ceb1b2 Revert "Add GENRULE_SANDBOXING=false to non-sandboxed builds"
Revert submission 2782270-genrule_sandboxing_by_default

Reason for revert: Potential culprit for b/305851039 and many other build breakages - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:2782270-genrule_sandboxing_by_default

Change-Id: I7b47a92e1b315add65c8018500d9ffbd58f8f1dd
2023-10-17 17:35:52 +00:00
Cole Faust
03787bea6d Merge "Remove baseModuleContext.debug" into main 2023-10-17 16:38:02 +00:00
Treehugger Robot
2b808d0f22 Merge "Fix typo in droidstubs" into main 2023-10-17 15:39:40 +00:00
Liz Kammer
fa774656a1 Merge "Restrict bp2build of hdr library props" into main 2023-10-17 13:54:16 +00:00
Liz Kammer
5dfe4be626 Do not convert sdk_version: "none"
These also require system_modules to be set. Wait until we convert
system_modules to convert sdk_version: "none"

Test: CI
Change-Id: I5bbdcb6819709a7c5a7932cb860a0de945f3528e
2023-10-17 09:10:13 -04:00
Liz Kammer
ba5f32a2f9 Improve error message readability
Test: n/a
Change-Id: Iceb0b68f4b83e2b43c0947885c514252a6de30c1
2023-10-17 09:10:13 -04:00
Liz Kammer
4e00b0929b Don't use java_library for java_import neverlink
Restricting use of sdk_version = "none" to only the rule types that will
correctly handled sdk_version = "none" by also handling system_module
attr

Test: CI && go tests
Change-Id: Ifa1c60ba8f5e3fcb28986cc84cdfaedcbd2d2957
2023-10-17 09:10:13 -04:00
Liz Kammer
e09e20ec47 Share constants for droidstubs btw Soong & Bazel
Test: m bp2build && verify constants
Change-Id: I04865414fb627672821b10d8bcc736379dc3da86
2023-10-17 09:10:08 -04:00
usta
04525ba886 Remove unused aquery structs
See aosp/I5962b27fe31f7103d2af6cef159f11747cff3ed9
where proto classes were used directly making
these structs unused.

Test: go test soong tests
Test: m nothing
Change-Id: Ib452aaa4ce069d882888fc2556ebf3bf7a94c2ca
2023-10-16 22:51:24 -04:00
Cole Faust
ab3ed73157 Merge "Add GENRULE_SANDBOXING=false to non-sandboxed builds" into main 2023-10-17 00:53:09 +00:00
Treehugger Robot
78eddf1804 Merge "Allowlist gcertstatus command to be run" into main 2023-10-16 23:52:17 +00:00
Treehugger Robot
60f72ffaa7 Merge "Remove makePathForInstall" into main 2023-10-16 23:16:05 +00:00
Cole Faust
3b703f3c02 Remove baseModuleContext.debug
It was never set to true.

Test: Presubmits
Change-Id: I9944d90b7e75beb4a7fe259c72bc7a82e42f593d
2023-10-16 14:20:00 -07:00
Treehugger Robot
c82e844121 Merge "Add assets property for Android apps." into main 2023-10-16 21:01:44 +00:00
Kousik Kumar
298c785766 Allowlist gcertstatus command to be run
With https://team-review.git.corp.google.com/c/foundry-x/re-client/+/2045536, reclient is starting to use gcertstatus instead of prodcertstatus to check for validity of google prod creds.

I'll remove the allowlist for prodcertstatus in a subsequent CL after new reclient is released.

Bug: b/169675226
Change-Id: I0e760c863d534b7a5744daf5f89f530be3d296ff
2023-10-16 20:40:18 +00:00
Cole Faust
7b4de4b859 Remove makePathForInstall
Test: Presubmits
Change-Id: I6e66af05ac578b98e212bcddcecaff6ce93e5cd5
2023-10-16 13:02:47 -07:00
Liz Kammer
170dd7239a Fix typo in droidstubs
Test: n/a
Change-Id: Idd58be843d01db008f1815f83149033bf5ac766d
2023-10-16 15:34:24 -04:00
Vinh Tran
59aa97a594 Merge "Remove restriction on android config in generated rust_library targets" into main 2023-10-16 19:08:35 +00:00
Jiakai Zhang
ba82e28d5d Add assets property for Android apps.
This property is similar to `asset_dirs`, but for individual files. This
is especially useful when the user wants to pack generated asset files
into the APK.

Bug: 257532944
Test: m nothing
Change-Id: If3062124e9dedb41315dcaf5d379803e5419b8cd
2023-10-16 18:53:30 +01:00
Jihoon Kang
bc98b4151d Merge changes from topic "stub_validation" into main
* changes:
  Add current api check as validation for from-text stub generation
  Disable full_api_surface_stubs for some java_api_library modules
2023-10-16 16:34:41 +00:00
Chris Parsons
efaa09b62e Remove a number of entries from module denylist
The entries removed from this list are mostly still unconverted because
of missing deps (they are automatically marked unconvertible because of
missing deps). The remainder are actually generated by bp2build as a
result of this change. These cases are for tests that build but don't
pass successfully. We thus simultaneously make a change refining
bp2build.sh. (See topic)

Test: bp2build.sh
Test: m nothing
Test: manual vetting of a number of modules via before/after
analyze_build

Change-Id: Ie9f2c11939258eb3e70ca1e385fe99a3cc4ce93a
2023-10-16 15:44:18 +00:00
Yi Kong
bc2d02aa6a Add additional flag required for Flow Sensitive AFDO
It can be removed in the future once it becomes default.

Test: presubmit
Bug: 304282732
Change-Id: Ia7729593eff13ba5cc69fdb54519305295313b4d
2023-10-16 16:59:21 +09:00
Jingwen Chen
aea8ba3534 Allowlist //system/linkerconfig
Test: b test //system/linkerconfig/...
Change-Id: I907524bd412fd6312f9c9478f3635ebbd8c27ce0
2023-10-16 06:52:41 +00:00
Yu Liu
f613da45db Merge "Handle the case where the release value set is a list." into main 2023-10-14 03:27:30 +00:00
Yu Liu
281288177e Merge "Allowlist fake_device_config in order to build some java_aconfig_library for host." into main 2023-10-14 00:06:40 +00:00
Yu Liu
eebb259356 Handle the case where the release value set is a list.
Bug: 304814040
Test: CI, unit test,
b build build/make/tools/aconfig:aconfig.test.cpp
b test build/make/tools/aconfig:AconfigJavaHostTest

Change-Id: I9ca939348a063c39e9528f24e788f9757458d30c
2023-10-13 16:45:51 -07:00
Treehugger Robot
f27f020528 Merge "Fix manifest_check.py for generated manifests that have no application tag" into main 2023-10-13 22:34:46 +00:00
Chris Wailes
ed75eef953 Merge "Set incremental or codegen-units, not both" into main 2023-10-13 21:19:17 +00:00
Yu Liu
873ad35f87 Allowlist fake_device_config in order to build some java_aconfig_library for host.
Bug: 305255550
Test: CI
Change-Id: Ic073a5fef0acccb7fcbbacb93c9f42ea80e8e154
2023-10-13 20:50:56 +00:00
Vinh Tran
37f26b9c6e Merge "Allowlist toolchain/pgo-profiles" into main 2023-10-13 20:34:03 +00:00
Aditya Kumar
511bd4207d Merge "Enable hot cold split" into main 2023-10-13 20:30:46 +00:00
Liz Kammer
96da2babed Restrict bp2build of hdr library props
Only migrate relevant attrs

Test: bp2build.sh
Change-Id: Ie6635789a64a542ecd5815dc29313b505cc1f19a
2023-10-13 16:22:24 -04:00
Treehugger Robot
8ec32beb07 Merge "Allowlist more frameworks" into main 2023-10-13 20:19:58 +00:00
Jihoon Kang
063ec003f9 Add current api check as validation for from-text stub generation
Currently, there is no build action ensuring that the API text files are
up to date, unless a user runs `m checkapi` or `m update-api`. This
means that the user must run `m update-api` after making a change that
modifies api surface(s), so that the API text file reflects the local
change. This adds additional layer of action to developers, and it is
not guaranteed that the developer will always run `m update-api` after
making an api surface-affecting changes.

To prevent such mistake, this change adds droidstub-level api check as
validation for from-text stub generation. With this change, the build
will fail if the API text file is not up to date and the user must run
`m update-api` when making api surface-affecting local changes.

The validation is done by adding all droidstubs modules associated with
the java_api_contributions passed to java_api_library via
`api_contributions` as dependency and setting the current api timestamp
files as the validations for the from-text stubs generating build rule.

The full api surface libraries will not run the validations to avoid
circular dependency. However, all java_sdk_library generated
java_api_library modules will run validations, mapped to the droidstubs
in the same api domaion.

If the user sets the environment variable `DISABLE_STUB_VALIDATION=true`, validation
actions are not run. Validation actions run by default.

Test: m nothing --build-from-text-stub and run ninja query to verify `check_current_api.timestamp`s are listed as validation \
      DISABLE_STUB_VALIDATION=true m nothing --build-from-text-stub and run ninja query to verify that validation actions are not added
Bug: 288624417
Change-Id: I329e6438fe8f3ac30d8c6a971d57853ed6b0d150
2023-10-13 18:24:41 +00:00
Colin Cross
149f6f6f78 Merge "Put shared library R.jar files in the classpath" into main 2023-10-13 18:08:04 +00:00
Vinh Tran
fb8c5a54ea Remove restriction on android config in generated rust_library targets
Bug: b/290790800
Test: b build //external/rust/crates/... --config=android
Change-Id: Id06dc94f8bff519c09de7a0de0f1999cf310f599
2023-10-13 11:51:18 -04:00