Commit Graph

66239 Commits

Author SHA1 Message Date
Romain Jobredeaux
bf315824ea Merge "Map prebuilt_apis labels to Bazel's manually generated ones." am: ea48fdc6f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2582551

Change-Id: I55e1e915d7d2a8fb96b3cb19f408f112fd03d9f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 18:55:43 +00:00
MarkDacek
3cd6a25953 Rename soong_ui's upload-metrics-only mode.
It also processes bazel metrics, and is thus misnamed.

Bug: 279988780
Test: b build libcore:all (with prints to verify that it's called)
Change-Id: I99828e759872ba2dfb583c20a01b8101395b3558
2023-05-10 18:39:58 +00:00
Romain Jobredeaux
ea48fdc6f8 Merge "Map prebuilt_apis labels to Bazel's manually generated ones." 2023-05-10 18:23:51 +00:00
Treehugger Robot
9e77afa6d0 Merge "Don't translate "required" to unsupported "data" in android_app." am: 26446238d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2583158

Change-Id: I8cbe0656035ff91a519faa155580a2eb485f8633
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 18:17:06 +00:00
Treehugger Robot
26446238d6 Merge "Don't translate "required" to unsupported "data" in android_app." 2023-05-10 18:14:52 +00:00
Mark Dacek
66b43d9799 Merge "Refactor upload-only to process bazel metrics outside of upload.go" am: 923a40777b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2584732

Change-Id: I1fd59270208d64512ff00568c766e0623b95ee1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 18:13:42 +00:00
Treehugger Robot
85524d529d Merge "Change bp2build converter of module "package"." am: f47760461c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2580791

Change-Id: I232c41db2afa607049623e78cee6c0c4d7654636
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 18:12:57 +00:00
Mark Dacek
923a40777b Merge "Refactor upload-only to process bazel metrics outside of upload.go" 2023-05-10 17:52:40 +00:00
Treehugger Robot
f47760461c Merge "Change bp2build converter of module "package"." 2023-05-10 17:38:19 +00:00
Alix
a381cd1973 Delete android/rules.bzl file
Bug: 277800767
Test: treehugger
Change-Id: I578bf63e33d15219812c2c17117186c74323d8d3
2023-05-10 15:33:10 +00:00
Joe Onorato
98e986542b TARGET_RELEASE is unavailable here, so don't print it.
Test: m
Change-Id: Iacb00db54882ed2578ca1aa1d8e71d5732fbe247
2023-05-10 05:56:57 -07:00
Yi Kong
1c22301735 Update clang version to clang-r487747c
Test: presubmit
Bug: 279955553
Change-Id: Ibe3b5e81f7850560b340c89a1f83d5ebdf4fc25f
2023-05-10 17:24:44 +09:00
Wei Li
2c9e8d6128 Change bp2build converter of module "package".
1) Use attribute name "default_package_metadata" instead of
   "default_applicable_licenses" in packages to better describe its use.
2) Add a filegroup "default_metadata_file" in packages to search for
   METADATA file in each package.
3) Include "default_metadata_file" in each package's
   "default_package_metadata" attribute.

Bug: 275472038
Test: CIs
Change-Id: I645c013c39e3190fd96c4a549d39a331aced16bd
2023-05-09 17:37:04 -07:00
Colin Cross
80462dc040 Propagate shared library destination path through FilesToZip
Shared libraries in fuzz zip files may have a different filename than
their source file, for example when the source file is a prebuilt in
the source tree.  Propagate the computed library name through
FilesToZip to soong_zip to use the correct name in the zip file.

Bug: 254867347
Test: builds
Change-Id: Ib0def8decdbec7842b8e1a9056fac373d743bac0
2023-05-09 23:19:31 +00:00
Colin Cross
25ff305370 Add -e argument to soong_zip to allow setting an explicit filename
soong_zip normally takes the name of the input source file as the
name of the file in the zip, which is ideal for zipping up
directories but not for constructing arbitrary zip files.  Add a
-e argument that explicitly sets the path in the zip file for
the next -f argument.

Bug: 254867347
Test: zip_test.go
Change-Id: If9d62c1a0064a485aebddf6d2a661f63f3e60b0f
2023-05-09 23:19:12 +00:00
Hamzeh Zawawy
38917496e5 Support removing suffix for device specific prebuilt during build
Some device specific prebuilts have a suffix that varies depending on the lunch target.
The resulting install dependency binary has the suffix.
The fuzzer build expects the presubmit binary without the suffix.
This change is to drop the suffix.

Test: make haiku
Change-Id: I8eadd84bf5797659b17bc428dca47b7c3f382aff
2023-05-09 23:11:42 +00:00
Cole Faust
c85d08f63b Make mk2rbc output paths relative to android root
Previously, mk2rbc would output absolute paths in the load statements.
This caused issues with the new module resolution logic in rbcrun,
and is not something we'd want to check in anyways.

Bug: 280685526
Test: go test
Change-Id: Iae6e3f6be9cecc8e19b6e1fd33c5575ff6864654
2023-05-09 15:00:58 -07:00
Alix Espino
3e10aabe32 Merge "Delete java/rules.bzl file" am: 9241da9662
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2578135

Change-Id: I29d7a640ef52aff04247d25206f94de2efd10d03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 20:53:26 +00:00
Romain Jobredeaux
56d41d0725 Don't translate "required" to unsupported "data" in android_app.
Bug: 228514588
Test: Presubmits
Change-Id: Ib964073d24f03cc3cdd389ba28b44ed96b61d841
2023-05-09 16:37:23 -04:00
Chris Wailes
883507a7c9 rustc-1.69.0 Build 10095304
Bug: https://issuetracker.google.com/issues/274972941
Test: m rust
Change-Id: I5f376bd661eee014793aceeeb37a012dfad1fd80
2023-05-09 13:19:31 -07:00
MarkDacek
733b77c2de Refactor upload-only to process bazel metrics outside of upload.go
Bug: 279987768
Test: m nothing
Test: b build libcore:all (with prints to verify similiar data)
Change-Id: I01d960a7215be30728c9e90f52c2455fd21cf1b8
2023-05-09 20:19:20 +00:00
Alix Espino
9241da9662 Merge "Delete java/rules.bzl file" 2023-05-09 20:18:36 +00:00
Mark Dacek
b2bc093b2d Merge "Add --bazel-exit-code parameter to soong_ui." am: 3e63067b11
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2580053

Change-Id: I1b1ea0d6295120ac8505fc110017dbdd727cc1d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 16:58:47 +00:00
Mark Dacek
3e63067b11 Merge "Add --bazel-exit-code parameter to soong_ui." 2023-05-09 16:26:46 +00:00
Treehugger Robot
dedbb43611 Merge "Add TARGET_RELEASE to the banner printout" am: a152e26848
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2580671

Change-Id: I076bad0aaa3d19e0f1665c0e893c6672f379d64c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 14:28:28 +00:00
Jiakai Zhang
7372e9d3f6 Merge changes from topic "revert-2580631-revert-2574032-XXTWCJDTDQ-YJWXHQZNPJ" am: 90c69f71c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2582191

Change-Id: Ib10d123c69b0362573ddc2f1e7df4b6cb1c4c7fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 14:28:07 +00:00
Treehugger Robot
a152e26848 Merge "Add TARGET_RELEASE to the banner printout" 2023-05-09 13:51:19 +00:00
Jiakai Zhang
90c69f71c4 Merge changes from topic "revert-2580631-revert-2574032-XXTWCJDTDQ-YJWXHQZNPJ"
* changes:
  Revert^2 "Generate app profiles even if dexpreopt is disabled."
  Revert^2 "Generate boot image profiles even if dexpreopt is disabled."
2023-05-09 13:50:55 +00:00
Treehugger Robot
78eaa7e26c Merge "APEX can use any Prebuilt libraries" am: 37be8a5a8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2581530

Change-Id: I22fe9877148c39132a896e97b8129f66766def9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 08:14:59 +00:00
Treehugger Robot
37be8a5a8f Merge "APEX can use any Prebuilt libraries" 2023-05-09 07:39:41 +00:00
Cole Faust
150f9a5a63 Bp2build support for soong config variables + os
For converting the art plugins to pure soong, it would be useful to
have a property that's qualified on both a soong config variable and
the OS. Soong had very little-known support for this by saying your
soong config variable changes the "target.android.cflags" property,
and we didn't supporting bp2building that. Add the bp2build support.

This cl also refactors product variable and soong variable bp2building
so that they're separate from each other, which I think makes the code
easier to understand.

Test: go test
Change-Id: Ic74dc75da8103fa2523da95c3560c9ce3c5e5672
2023-05-08 17:50:06 -07:00
Jared Duke
feadf8b0db Merge "Fix Proguard configuration output from R8 invocation" am: fda5890f24
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2580792

Change-Id: I79c0ac2c1dbdb0d7aa5cf2ea2b2c3d94a4831a5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-08 23:04:43 +00:00
Jared Duke
fda5890f24 Merge "Fix Proguard configuration output from R8 invocation" 2023-05-08 22:20:11 +00:00
Spandan Das
6aaab9d2aa Special case platform variant of bootstrap libs
Platform variants of libraries that set `bootstrap: true` in their
Android.bp file gets impl in Soong. This CL ports this behavior to
bp2build.

Note that even after this CL, there will be still be some other cases
where stub/impl logic does not match Soong perfectly (most notably the
platform_apis property which is propagated top-down from the parent
apex).

Test: bp2build.sh
Change-Id: I3da284ab42631d6de1c0d52e56ccbfd4e4a09f1d
2023-05-08 21:11:49 +00:00
Spandan Das
6d4d9da47f Select stub/impl per apex variant
Create a select statement for every api_domain a library could be
included in. The stub/impl
selection heuristics per apex domain are
1. If dep has stubs and the api domain appears in dep's apex_available, use
   impl
2. If dep has stubs and the api domain does not appear in dep's
   apex_available, use stubs

(Category 3: If dep does not have stubs and the apex does not appear in
dep's apex_available, then a separate apex_available validation in Bazel
will emit an error).

Platform variants have been special-cased for now to use equality of
apex_available for stub/impl selection

Test: go test ./bp2build
Bug: 272378496

Change-Id: Ibd29efd763c8863c7e6d2a9af0da30bbde07175d
2023-05-08 21:11:46 +00:00
Jiakai Zhang
cf61e3c591 Revert^2 "Generate app profiles even if dexpreopt is disabled."
Revert submission 2580631-revert-2574032-XXTWCJDTDQ

Reason for revert: Fixed build breakages

Reverted changes: /q/submissionid:2580631-revert-2574032-XXTWCJDTDQ

Bug: 280440941
Test: lunch aosp_cf_riscv64_minidroid-userdebug && m UNSAFE_DISABLE_HIDDENAPI_FLAGS=true dist
Test: Disable dex2oat on host (to simulate macOS) and build
Change-Id: I6090b4b74cedb6d129fcbeef58d075c8ccdcc4e2
2023-05-08 21:29:23 +01:00
Jiakai Zhang
bc698cd28a Revert^2 "Generate boot image profiles even if dexpreopt is disabled."
Revert submission 2580631-revert-2574032-XXTWCJDTDQ

Reason for revert: Fixed build breakages

Reverted changes: /q/submissionid:2580631-revert-2574032-XXTWCJDTDQ

Bug: 280440941
Test: lunch aosp_cf_riscv64_minidroid-userdebug && m UNSAFE_DISABLE_HIDDENAPI_FLAGS=true dist
Test: Disable dex2oat on host (to simulate macOS) and build
Change-Id: I5f7f746ca1d4da660fe0c40115e6c71750dfdccc
2023-05-08 21:28:13 +01:00
Romain Jobredeaux
8242b43df8 Map prebuilt_apis labels to Bazel's manually generated ones.
Change-Id: I5bec807da9b39e2b166af1bd83da43df91f997ef
Bug: 237810289
Test: check that android-non-updatable.stubs.module_lib uses manual
bazel target for its sdk_system_current_android dependency

Change-Id: I6f5fb348e1dcaad10eb756382359f34de792b6e0
2023-05-08 15:26:43 -04:00
Spandan Das
a43ae1366e For test apexes, base_apex_name is the api domain
apex_test do not "override" the source apexes that they test. However,
similar to override_apexes, test apexes have the same path
(/apex/<apex_name>) on device. Instead of creating another property,
reuse the existing base_apex_name property. The use case for this will
be for creating selection statements for stub/impl selection.

Test: go test ./bp2build
Change-Id: I4b7548e0e0fc920e407e1c5e5c00e87efc6e70c9
2023-05-08 19:04:32 +00:00
Alix
a28acb5a16 Delete kotlin/rules.bzl file
Bug: 277800767
Test: treehugger
Change-Id: I5cff1e4bbb18b9145335169bc4edb0d569525b35
2023-05-08 18:02:01 +00:00
Justin Yun
3cc7846b58 APEX can use any Prebuilt libraries
Vendor snapshot libraries generated from prebuilt libraries set
"apex_inherit" to their min_sdk_version property to allow them to be
used by vendor APEXes.

Bug: 277403349
Test: m vendor-snapshot
Change-Id: Idd9e5f8e94b3fa2adf47a04507bf0c50c59edfb7
2023-05-08 22:33:35 +09:00
Jooyung Han
f89441a508 Mark LLNDK prebuilts as LLNDK am: e3f0281b88
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2579654

Change-Id: I7b35d3176a93423324e6d215343c905d9257bd5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-08 13:24:16 +00:00
Jooyung Han
e3f0281b88 Mark LLNDK prebuilts as LLNDK
so that Vendor APEXes don't embed the LLNDK prebuilts (which are just
stubs of LLNDK libraries).

Bug: 280697209
Test: m nothing (soong test)
Change-Id: I9e6c123e73fa0ab56d8494a01652ee32a9b6a6cd
2023-05-08 17:05:20 +09:00
Treehugger Robot
34d8436fb5 Merge "Prebuilt replacing source should not change partition" am: 7ef8d46640
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2574171

Change-Id: Ie3f3eeeeef13608d57bf9665f6b6c1caa7cd8cb1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-08 06:26:28 +00:00
Treehugger Robot
7ef8d46640 Merge "Prebuilt replacing source should not change partition" 2023-05-08 05:40:40 +00:00
Jeff Hamilton
d27fedf8e9 Add TARGET_RELEASE to the banner printout
Test: run lunch with and without a release and confirmed it's printed
Change-Id: I67e86aa1328ae464a1bb10dfdcd8e024e72d77a8
2023-05-08 03:17:06 +00:00
Jeongik Cha
591366dd63 Invoke writeNinjaHint for only actual build
Bug: 273282046
Test: m nothing
Change-Id: I13754646c786b0cfee8c8d75a8b61e62b54c32ba
2023-05-08 11:32:52 +09:00
Treehugger Robot
eac6e0ea1a Merge "Drop androidx libraries from baselineApexAvailable" am: dd69e0f225
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2578185

Change-Id: Ic01636efe3191b83a3a8d99291fc13a453be0936
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-06 01:16:18 +00:00
Treehugger Robot
dd69e0f225 Merge "Drop androidx libraries from baselineApexAvailable" 2023-05-06 00:43:08 +00:00
Spandan Das
072f7bc5f2 Remove CellBroadcast apps from baseline apex available map
Since these apps explicitly set com.android.cellbroadcast in their
Android.bp files, they do not need to be present in the baseline
apex_available map.

Test: m nothing
Bug: 281077552
Change-Id: Ibea86bfbc7e460e27c5e780b611674e66e9cf727
2023-05-05 22:52:36 +00:00