Commit graph

62872 commits

Author SHA1 Message Date
Yu Liu
249998d290 Merge "Denylist libunwindstack for now until later." 2023-02-02 07:07:40 +00:00
Jiyong Park
c7a4688b9d Symbol files for Rust binaries in APEXes are exported
Bug: 228083190
Test: build and check symbols/apex/com.android.virt/bin/crosvm exists.
Change-Id: Id8b401723791d13dfc68c8e6972e73f875292924
2023-02-02 11:33:39 +09:00
Yu Liu
828c4065e1 Denylist libunwindstack for now until later.
Bug: 266446882
Test: b and m build tzdata and adbd
Change-Id: Idb931c37b082743251aae0e633fd7e51ca651a9b
2023-02-01 20:40:42 +00:00
Dennis Shen
d4f5d932a1 Add soong unit test for trimmed apex build
BUG: b/259381334
TEST: m nothing
Change-Id: I49e5d31a6f5c4f9a72a6a4b3b2ab7114b996adbc
2023-02-01 20:23:46 +00:00
Yabin Cui
43d873625f Update bindgen clang version to r475365b
Bug: 253033919
Test: build
Change-Id: I2fd71206a540da7001956f1f6f5aae5d4f925920
2023-02-01 11:17:09 -08:00
Treehugger Robot
fd659ef7da Merge "Remove R8-specific flags from soong config" 2023-02-01 17:18:42 +00:00
Sam Delmerico
acddda07de Merge "remove errorprone/processor classpath from r8 flags" 2023-02-01 16:01:32 +00:00
Zhi Dou
7fc88d5f49 Merge "Make min_sdk overridable in override_apex" 2023-02-01 13:59:14 +00:00
Treehugger Robot
67a7ab89cf Merge "Stop ignoring the targetSdkVersion when it includes the API fingerprint SHA" 2023-02-01 13:42:07 +00:00
Spandan Das
357ebe5e6d Merge "Doc updates for #apex and #systemapi" 2023-02-01 01:39:53 +00:00
Spandan Das
92b6e8ec72 Merge "Java API export of CorePlatformApi surface" 2023-02-01 01:20:11 +00:00
Paul Duffin
aa2aad6d0f Stop ignoring the targetSdkVersion when it includes the API fingerprint SHA
Change https://r.android.com/1959021 introduced a regression in the
handling of the `targetSdkVersion` when using the API fingerprint.
Prior to that change, when `UseApiFingerprint(ctx)` returned true that
would cause all APKs (apart from `framework-res`) that were built to
use a `targetSdkVersion` that included the API fingerprint SHA. After
that change the `UseApiFingerprint(ctx)` had no effect on the setting
of `targetSdkVersion`.

This change corrects that.

Bug: 266899206
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true TARGET_BUILD_APPS="NetworkStack" m
      aapt2 dump badging out/target/product/generic/system/priv-app/NetworkStack/NetworkStack.apk
      # Run above before and after this change and see that the targetSdkVersion
      # has changed to `UpsideDownCake.<SHA>`.
Change-Id: Ic6e1da552c565cc4bd75cc734b3acb7faec67981
2023-02-01 00:03:09 +00:00
Bob Badour
27b01cee26 Create OWNERS file for compliance teams.
Test: m droid dist

Change-Id: Id79351ec53d7d99a894e400e3fb002d92edd18c9
2023-01-31 15:03:25 -08:00
Spandan Das
24df3c20e7 Doc updates for #apex and #systemapi
These include
- Drop the synonym sentence. With the enforcement introduced in
  aosp/2153678, they can no longer be used interchangeably
- Add information that a single .map.txt file cannot contain both these
  two annotations.
- Link a bug that provides additional context on why this granularity
  is necessary.

Test: N/A
Bug: 266824291
Change-Id: I31b49d492ec56f2f6f0b88de6e608e4ec6fe7011
2023-01-31 22:23:32 +00:00
Sam Delmerico
704d6b9a62 remove errorprone/processor classpath from r8 flags
This classpath includes compile-time-only jars that may conflict with program/library jars referenced by R8 and used by the target.

Test: go test ./java
Test: m && inspect output for r8 warnings
Bug: 242088131
Change-Id: Id4db3c9482e78cdcc0c9d37b9a77eaf94ac95cb3
2023-01-31 21:56:54 +00:00
Treehugger Robot
f987b38cf9 Merge "Remove unused field 'subAndroidMkOnce'." 2023-01-31 21:52:29 +00:00
Christopher Ferris
1f4ccd2ada Merge "HWAsan: Increase the malloc fill size." 2023-01-31 21:45:18 +00:00
Jared Duke
6587cecab3 Remove R8-specific flags from soong config
Instead, move them to R8Wrapper. Having all of these R8-specific flags
in a single location, bundled within the R8 repo, is easier to maintain.
This should be a no-op for generated code.

Test: m + validate identical dex output
Change-Id: Ibdeecef8ca5d311d353dd623c73fab608ccd2681
2023-01-31 12:45:00 -08:00
zhidou
133c55b48a Make min_sdk overridable in override_apex
It makes sense to make min_sdk overridable because the override_apex is
a variant of the original apex, and this variant might be
created/introduced in the newer Android release compared with the base
apex. Despite the fact that the source of the variant apex is the same
as the original one, the variant may not support the older version, like
Go modules, trimmed modules. If we consider the variant as a "new"
module, then it makes sense to have a new min_sdk to make it only
available for the newer Android released version only.

Bug: 266945903
Test: Build locally, and check if the override works
Change-Id: I7f4c7169e15b7e57f44a4abafe012151dbc226a0
2023-01-31 19:34:55 +00:00
Jared Duke
8e0ae8e960 Merge "Enable same-file policy for R8 optimizations" 2023-01-31 16:54:42 +00:00
Spandan Das
da97755329 Java API export of CorePlatformApi surface
API export currently uses a naming convention to determine the api
surface of a droidstubs module. Add platform.api to this naming
convetion for CorePlatformApi surface

Test: N/A
Bug: 262014796
Change-Id: I1255e7e54d4a1dfb9e040184b90d6e8b7146c028
2023-01-30 23:54:11 +00:00
Treehugger Robot
9bedfd0d4b Merge "Rename API surface provided to mainline modules" 2023-01-30 23:06:22 +00:00
Christopher Parsons
94f8a60f5d Merge "Fix nondeterminism in bp2build" 2023-01-30 22:58:17 +00:00
Chris Parsons
7b3289b471 Fix nondeterminism in bp2build
This fixes two main sources of nondeterminism:

1. Fix a bug in the ConfigurationAxis comparator (which caused
   ConfigurationAxis sorting to be nondeterministic)
2. Process C++ dependencies using the sorted ConfigurationAxis order. In
   theory, the order in which dependencies are processed shouldn't
   matter (as they should end up in different select stanzas). However,
   in the case of InApex stubs, this is not the case; we now ensure
   that lists are concatenated in a predictable order.

Added bonus: Some cleanup with SortConfigurationAxes which
makes use of go generics (this made it easier to debug this issue).

Will follow-up with regression tests.

Test: Manually verified that build.ninja checksum and BUILD.bazel checksums do not change after running `m nothing` 6 times in AOSP (with comment-only Android.bp changes in between each run)

Change-Id: I81168e45bdbbcd61ea95ff665cf6c4bc180aa4e0
2023-01-30 21:26:57 +00:00
Usta (Tsering) Shrestha
e136efdcfa Merge "prune out empty bazel depsets" 2023-01-30 21:04:08 +00:00
Usta (Tsering) Shrestha
28b5ac6db5 Merge "soong_build cmline args validation" 2023-01-30 20:50:44 +00:00
Cole Faust
56080ddc08 Merge "Precompile python sources" 2023-01-30 20:02:27 +00:00
Treehugger Robot
f21f25f172 Merge "Delete apexBundle#prebuiltFileToDelete." 2023-01-30 18:30:57 +00:00
Treehugger Robot
32c52ad62f Merge "convert cc_object crt property in bp2build" 2023-01-30 17:07:37 +00:00
Usta Shrestha
13fd5aead7 prune out empty bazel depsets
Instead of using a sentinel file that was created under bazel_workspace
prune them out. The sentinel file was being created under bazel_workspace,
which would be deleted and thus rendered useless from the perspective of
not retriggering a build.

Test: `touch Android.bp` then `NINJA_ARGS="-d explain" m --bazel-mode-staging adbd_test`
Bug: 265155778
Change-Id: If5d8f0ea7f3b8828fda0646faafd1a621f0cb27c
2023-01-30 11:37:04 -05:00
Jingwen Chen
fb708e99f7 Delete apexBundle#prebuiltFileToDelete.
Nothing is reading this field. Delete it.

Test: presubmits
Change-Id: I47d15b7c4e2aca4b251059305c27c2a9b5f05b1f
2023-01-30 12:07:19 +00:00
Cole Faust
5c503d1c43 Precompile python sources
This signifigantly improves the startup time of soong-built
python binaries. For example, running
`m apexer && time out/host/linux-x86/bin/apexer` gives
0.734s before this cl, and 0.094s after.

Fixes: 259718110
Test: Presubmits
Change-Id: Ib19e83e2c60c39a849525be117279c318de3afa7
2023-01-27 15:43:38 -08:00
Wei Li
80f1ef15cc Change grep pattern so it can report number of CppCompile actions correctly without being impacted by setting -march on command line twice.
Bug: 266930443
Test: build/soong/tests/apex_cc_module_arch_variant_tests.sh
Change-Id: Ifd74e8cfc86dd94fce632beac049cc81430bfc46
2023-01-27 22:52:20 +00:00
Mark Dacek
3420d978cf Merge "Write bazel metrics file from soong." 2023-01-27 22:27:39 +00:00
Sam Delmerico
78aca80710 Merge "add androidmk cc-related variables to androidmk" 2023-01-27 21:04:29 +00:00
Sam Delmerico
5fb794ae37 clean up CL for androidmk variables
Change-Id: If14d1925bea78f467740f8395f1d529db00b618c
2023-01-27 16:01:37 -05:00
Colin Cross
ec41b5c2e2 Merge "Disable VNDK apexes for unsupported API levels" 2023-01-27 19:49:48 +00:00
Colin Cross
bb137a3956 Disable VNDK apexes for unsupported API levels
Disable VNDK apexes when their version is below the minimum
supported API level for the primary architecture.

Test: TestVndkApexCurrent
Change-Id: Ie72a5beb9da432660d3fec5c520402224326f961
2023-01-27 19:49:38 +00:00
Colin Cross
31a8bd828b Merge "Raise minsdk for CRT dependencies" 2023-01-27 19:49:14 +00:00
Colin Cross
a13de4dea4 Merge "Don't install system image copies of libraries in unbundled apex builds" 2023-01-27 19:27:54 +00:00
Jared Duke
a1b8b9bab9 Enable same-file policy for R8 optimizations
While this does increase dex size for optimized targets by limiting the
scope of class merging, it also
  1) improves actionability of unretraced stack frames
  2) improves accountability for size increases
  3) tends to decrease compiled code sizes for impacted targets
  4) marginally (~1%) decreases RSS

Improvements in tooling should mitigate (1) and (2), and more targeted
use of @NeverInline can mitigate (3). Until such time, the pros seem to
outweigh the cons, so we enable the policy as a temporary measure.

Bug: 264916934
Test: m
Change-Id: Id63a17955692b75b16c42d9c85b55bae409c0da4
2023-01-27 11:25:26 -08:00
Colin Cross
dd60d3aa66 Merge "rustc-1.65.0.p1 Build 9523344" 2023-01-27 18:56:29 +00:00
Diwas Sharma
fe4587161b Merge "Revert "Don't add flattened files apex as dependencies of an image apex"" 2023-01-27 17:55:13 +00:00
Treehugger Robot
6e7441edde Merge "Read ApexMkInfo for modules to be installed." 2023-01-27 15:45:08 +00:00
Dennis Shen
0c79be54b6 Merge "Support trimmed variant build in soong" 2023-01-27 13:11:50 +00:00
Jingwen Chen
29743c8423 Read ApexMkInfo for modules to be installed.
This piggybacks onto the ApexInfo cquery handler, so we're issuing a
single bazel query call that reads two providers in the starlark expr.

Also rename requiredDeps to makeModulesToInstall to differentiate it from
APEX's required/provided libs in the apex manifest.

Test: unit test
Test: mkdiff
Fixes: 263123189
Change-Id: Ib7e43f1586f29864eee8627dba3631bfaff27afa
2023-01-27 04:02:45 +00:00
Zhenhuang Wang
b5ad1eecca Merge "Support storing SHA256 checksum for files in soong_zip" 2023-01-27 02:34:44 +00:00
Jason Wu
47b0c8c620 Merge "Delete empty entries for covertedModules in bp2build_metrics" 2023-01-27 02:02:39 +00:00
Diwas Sharma
bb9202e688 Revert "Don't add flattened files apex as dependencies of an image apex"
This reverts commit eb8cd3122a.

Reason for revert: mainline module jacoco jar do not contain JAVA_LIBRARIES needed for coverage, see: b/266679012

Change-Id: If756f7aaf40c6bcfed170c59c494bcc426620039
2023-01-27 00:40:21 +00:00
Jihoon Kang
b6690d21ae Merge "Generate java_api_contribution module from droidstubs module" 2023-01-26 23:54:14 +00:00