Commit Graph

3190 Commits

Author SHA1 Message Date
Martin Stjernholm
2fb081fd28 Merge "Revert "Implement mixed builds for apex modules."" am: 0bb7f0494e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2165026

Change-Id: I375077ee73ba18308d0841ca76956757935dd992
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 14:08:18 +00:00
Martin Stjernholm
0bb7f0494e Merge "Revert "Implement mixed builds for apex modules."" 2022-07-26 13:52:18 +00:00
Martin Stjernholm
8a3c914942 Revert "Implement mixed builds for apex modules."
Revert submission 2147387-mixed_builds

Reason for revert: Breaks zipapex build on git_master-art-host
Bug: 239925080
Reverted Changes:
I9f1e03e5e:Implement mixed builds for apex modules.
I13d9a0270:Add container and bundle encription key pairs to t...

Change-Id: I0eaad4dd81cac16d634f4c9cec18137a38e30d47
2022-07-26 09:35:39 +00:00
Paul Duffin
e3e8ba7745 Merge "Export any platform_compat_config used by apex to sdk snapshot" am: 69d09f49ec am: fa26f65155 am: 4dcb86de2c am: a984b2b876
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2160797

Change-Id: I416dc6c804b2b110946d879f10fcbe1b5683132e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 23:39:41 +00:00
Paul Duffin
fa26f65155 Merge "Export any platform_compat_config used by apex to sdk snapshot" am: 69d09f49ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2160797

Change-Id: Icb98af219a66d7ad48518ac49c6150798361f62b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:29:39 +00:00
Paul Duffin
fcf79850d8 Export any platform_compat_config used by apex to sdk snapshot
Previously, the platform_compat_config modules needed to be explicitly
listed in the sdk snapshot and the apex. This change will automatically
export them to the sdk snapshot when the apex is listed in its apexes
property.

Bug: 232401814
Test: m tethering-module-sdk
      # Before this change the generated snapshot did not contain the
      # platform_compat_config, after this change it did.
      m art-module-sdk
      # As that explicitly specifies the platform_compat_config in its
      # compat_configs property this change has no effect.
Change-Id: Ia854b9a52db2b1619fca41a387ce98d7f9f9efe9
2022-07-20 14:18:24 +00:00
Alexander Smundak
8e728f144e Merge "Implement mixed builds for apex modules." am: 9ec1ff98b7 am: f7ccf8c822 am: 34a6bda87e am: 035e5fddd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104104

Change-Id: I65ea31f7232738d87ed3319c684475fa7d44d561
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 15:01:44 +00:00
Alexander Smundak
f7ccf8c822 Merge "Implement mixed builds for apex modules." am: 9ec1ff98b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104104

Change-Id: I1fb794735088c8d69bd425cbe6a9d4b62b9ca43d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 13:59:21 +00:00
Alexander Smundak
9ec1ff98b7 Merge "Implement mixed builds for apex modules." 2022-07-19 13:38:55 +00:00
Treehugger Robot
ba126223e4 Merge changes I0484ea34,I188e4824 am: b3f18a9f9f am: 03c590b4e1 am: bc5a0199e9 am: 3283d6c8d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153678

Change-Id: I067e38c5db2f7b09820df4c3c45b3ffefcade38e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 07:44:47 +00:00
Treehugger Robot
03c590b4e1 Merge changes I0484ea34,I188e4824 am: b3f18a9f9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153678

Change-Id: I412a85473760a3dc7915984d013350edb00ad74b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 06:44:19 +00:00
Jiyong Park
85cc35a143 Distinguish # apex and # systemapi symbols
Previously, the symbol tag `# apex` was treated the same as `#
systemapi`. With this CL, they have different meanings.

`# systemapi`: APIs that are defined in the platform (the non-updatable
part), and are exposed to unbundled system components like APEX

`# apex`: APIs that are defined in the APEX and are exposed to the
platform or other APEXes

Bug: 239274367
Test: m
Change-Id: I0484ea349656dbbd337e5fe3a5970f0ad275b807
2022-07-19 13:47:19 +09:00
Sasha Smundak
6a2b7c40b3 Implement mixed builds for apex modules.
* Add ApexCqueryInfo to obtain apex artifacts used by the makefile
  generator and downstream modules
* Refactor code common to GenerateAndroidBuildActions and ProcessBazelQueryResponse
* Implement android.MixedBuildBuildable for modules
* Enable mixed build for apex modules with payload_type:"image"

Bug: 232085015
Test: treehugger
Change-Id: I9f1e03e5e7a5b5dde35a5db10c253069543ac973
2022-07-18 13:34:36 -07:00
Alexei Nicoara
d4ffbcacb6 Merge "Cleaning up comment removal and version replacement" am: 74788ec25e am: 2276889374 am: 6ed3b0b41a am: b003b289d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151256

Change-Id: Ieebac0a5127ab28f4ad4dc5282fcb4ba7f20f386
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 12:31:05 +00:00
Alexei Nicoara
2276889374 Merge "Cleaning up comment removal and version replacement" am: 74788ec25e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151256

Change-Id: I4ca57f41efd50def2c4a204e34d1567f9e6f5d1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 11:37:59 +00:00
Alexei Nicoara
e2d0984654 Merge changes Ibcf908d9,I786ab152 am: 1e3d27821b am: 6a5cdc7c19 am: 2426047290 am: a5642cbdfb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149659

Change-Id: I4879ce2b54a55eb33d942e1c714119addf411d6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 14:37:35 +00:00
Alexei Nicoara
0a3892031e Cleaning up comment removal and version replacement
jsonmodify is now responsible for striping the comments and replacing the placeholder  version with the defaule one. Cleaning up the old code.

Test: presubmit
Bug: 231691643
Change-Id: I09af00199aefec09b2d5995b2923525a3a42c362
2022-07-12 14:50:48 +01:00
Alexei Nicoara
6a5cdc7c19 Merge changes Ibcf908d9,I786ab152 am: 1e3d27821b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149659

Change-Id: I59debb4001f86899d6116df849088db60832e3c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 13:28:03 +00:00
Alexei Nicoara
d887e24260 Cleaning up the version sed rule
Bug: 231691643
Test: presubmit, checked itermediary jsons
Change-Id: Ibcf908d9365ab41e5a19211f5a60305a0896dea5
2022-07-12 11:53:21 +01:00
Alexei Nicoara
e938002c24 Merge "Replace version 0 with the default version" am: 2971a94e4c am: 656399f062 am: 2668973418 am: c34e227419
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149073

Change-Id: Ib16bec5543d9bba6eed411a7dd27e6137bc18ac6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 11:29:37 +00:00
Alexei Nicoara
656399f062 Merge "Replace version 0 with the default version" am: 2971a94e4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149073

Change-Id: Iab0a62bca5829017965ad2dfdf85423792ff7733
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 09:31:10 +00:00
Alexei Nicoara
e922d2139d Replace version 0 with the default version
Having 0 as the default version causes problems in flattened apexes and
is being parsed in protobuf as non-existing field. It will be hard to
revert 100 of commits for all the modules. Changing the version in soong
to mitigate time impact.

Test: presubmit, checked .intermediary jsons
Bug: 231691643
Change-Id: I451186d79fd9f8345fd4e28d9daadbfc59047445
2022-07-08 17:38:52 +01:00
Paul Duffin
3611e6609d Merge "Add apexes property to sdk" am: 0d89b3dc27 am: 4057d6455a am: da014983b3 am: 00e64f4aa0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096447

Change-Id: Icaef07d099761c689ce7556b04b655971f30b4c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 12:08:22 +00:00
Ken Chen
5372a24375 Disallow '_' in bpf source name
Current design:
1. The bpf compiled object name is derived from the source name
   (e.g. foo.c -> foo.o).
2. Full bpf program/map name are concatenated by object name + '_' +
   program/map name in run-time. (e.g. obj name: x.o; program name: y_z;
   full bpf program name will be x_y_z)

Issue:
x.o with map y_z and x_y.o with map z can cause naming collision in
run-time, since both result in x_y_z. This commit prevents it from
happening with a build-time check.

Bug: 236706995
Test: m
Change-Id: Ic03bfcf07a5748ed63246b71d5ae8de0405e658a
2022-07-07 20:02:28 +08:00
Paul Duffin
4057d6455a Merge "Add apexes property to sdk" am: 0d89b3dc27
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096447

Change-Id: Ib57f709febd0827967afcd301825d7dae568b67a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 10:59:52 +00:00
Paul Duffin
0d89b3dc27 Merge "Add apexes property to sdk" 2022-07-07 10:40:00 +00:00
Treehugger Robot
f26e6d0f5f Merge "Passing default version to zipApex as well" am: 87d74dc54e am: 97bc4873db am: 52939c2ec8 am: e099d90bd5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2146859

Change-Id: Ic26807d0a4d0c6c8e93b3ab95cb5212f0d0dd78a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 19:14:08 +00:00
Treehugger Robot
97bc4873db Merge "Passing default version to zipApex as well" am: 87d74dc54e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2146859

Change-Id: I08367146ccb17bc16ad6d612c1470f850b469955
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 18:21:11 +00:00
Treehugger Robot
87d74dc54e Merge "Passing default version to zipApex as well" 2022-07-06 17:42:34 +00:00
Paul Duffin
4e7d1c43e2 Add apexes property to sdk
Specifying an apex in the apexes propety will cause all the
*classpath_fragments that are contents of the APEX to be automatically
added as members of the sdk and appear in the snapshot.

The purpose of this change is to dedup the APEX and sdk definitions and
try and avoid some of the issues that we have been finding while
attempting to build against the prebuilts.

Two tests, one each for bootclasspath_fragment and
systemserverclasspath_fragment, have been refactored to compare the
output when adding the *fragment to the sdk directly of via the APEX.
That ensures switching to use the APEX will not change the sdk snapshot
unless it was previously missing a *fragment.

There was also a slight difference in where the hidden API flags were
copied from. That should have no impact on the output as the flags are
identical.

The sdk snapshot generation needed some tweaks to avoid generating a
prebuilt for the APEX.

Bug: 232401814
Test: m nothing
Change-Id: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
2022-07-06 15:58:43 +00:00
Alexei Nicoara
c939b0181d Passing default version to zipApex as well
Test: presubmit
Bug: 231691643
Change-Id: Ic751d7ea2d23180855897702a03bf1b589d7ef80
2022-07-06 13:56:50 +01:00
Alexei Nicoara
919fc29377 Merge "Removing comment lines from apex_manifest.json" am: f6152a161b am: 663d7560da am: 5bb9d3e85d am: 8a9f099c34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142072

Change-Id: Iadfc5433db3a40e8397f3ee566b2a21f707c94cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 15:20:43 +00:00
Alexei Nicoara
663d7560da Merge "Removing comment lines from apex_manifest.json" am: f6152a161b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142072

Change-Id: I1009e2d99e417e25e48b24345810f32f5dcaf818
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 14:30:12 +00:00
Alexei Nicoara
ee4b633627 Removing comment lines from apex_manifest.json
Allowing comments in apex_manifest.json by stripping all the lines which
start with //

Test: presubmit
Bug: 237532860
Change-Id: Iec8c9987edf19b763b2b87df7d125c006ffb217a
2022-06-30 16:34:28 +01:00
William Escande
49bc23b601 Clear apex.go entries for bluetooth libs am: 89bca3f301
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19111518

Change-Id: Ib43164dedb4fcd90addcecd570f195e08dc6428b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 00:55:59 +00:00
Xin Li
42307c80c7 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:16:54 +00:00
Treehugger Robot
4f7d0eb241 Merge "Refactor apexBundle code." am: 114ad30d76 am: 7028b50308 am: a416730bf1 am: 05941e95e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2138053

Change-Id: I41db417767906075c49c274bab766773e5cebab2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 09:17:56 +00:00
Treehugger Robot
a416730bf1 Merge "Refactor apexBundle code." am: 114ad30d76 am: 7028b50308
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2138053

Change-Id: I20c91b9425adffb44115dfc59e4b40cfa562b669
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 08:32:59 +00:00
Sasha Smundak
6f9e91d5e9 Refactor apexBundle code.
Move dependency walker out of GenerateAndroidBuildActions, reduce IDE
warnings.

Test: treehugger
Change-Id: I520c59772b1da7102d2a2364b2c56789455ea7fb
2022-06-28 22:47:43 -07:00
William Escande
89bca3f301 Clear apex.go entries for bluetooth libs
The module availability to Bluetooth is currently hard-coded in apex.go.
We are in the process of cleaning the apex.go by adding the availability
in each required module

Test: Build + TH + boot phone & use bluetooth
Bug: 216433795
Change-Id: I883a12f89a6d7eb43778e04ac50d6af38dd97116
2022-06-29 01:04:15 +00:00
William Escande
0ac940fab3 Merge "Clear apex.go entries for bluetooth libs" into tm-qpr-dev am: aec111952d
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18743691

Change-Id: Ied2610e2599dea44e338b3d3f51bd5e873bf3400
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 23:25:51 +00:00
William Escande
aec111952d Merge "Clear apex.go entries for bluetooth libs" into tm-qpr-dev 2022-06-28 23:09:56 +00:00
Oriol Prieto Gascó
cda10e187b Merge "Hard-code apex_available handling for the btservices apex" into tm-dev am: 3bb9d7a8d9 am: bb63423da1 am: 7b8cb64821
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18972588

Change-Id: I7742de88e124be497b0f60a73fd81852c464848d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 18:38:07 +00:00
Oriol Prieto Gascó
7d7bc5bef1 Merge "Hard-code apex_available handling for the btservices apex" into tm-dev am: 3bb9d7a8d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18972588

Change-Id: I5c6cc4bc32174ba0739d7ed6b42ae0b1685c4ef6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 17:43:25 +00:00
Oriol Prieto Gasco
8132fbf8c1 Hard-code apex_available handling for the btservices apex
Bug: 236192423
Test: TH
Change-Id: Ie095ae22704a80e0ec171b1bb3fdc995f95a1c64
2022-06-19 23:13:25 +00:00
Treehugger Robot
9f7fa50427 Merge "Restrict IsSanitizerEnabled() to android.Config()." am: 1c6502eba2 am: 7125d5d606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2127446

Change-Id: Ie6b578793fa05304b869795af4e0ca4455b75d5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 23:05:53 +00:00
Lukacs T. Berki
01a648afa0 Restrict IsSanitizerEnabled() to android.Config().
Turns out, the whole context is not needed and then let's not
plumb it any further than necessary.

Test: Presubmits.
Change-Id: I1a25738e5a6ca20dea0d973c2ce435b5e152399b
2022-06-17 08:59:37 +02:00
Paul Duffin
5556c5f17a Treat <x> and <x>_compressed prebuilt APEXes as being equivalent
(cherry picked from commit 1aa50564c7)

When extracting dex files from prebuilt APEXes the build fails if it
finds two or more prebuilt APEXes that could provide the dex files.
This change treats <x> and <x>_compressed APEXes as being the same
and always selects the uncompressed APEX.

Bug: 235284603
Test: m nothing
      # Added TestDuplicateButEquivalentDeapexersFromPrebuiltApexes
      # Failed without this change, works with it.
Merged-In: I805cb9dfa9f590c91585d75c4f4586b212b73d41
Change-Id: I805cb9dfa9f590c91585d75c4f4586b212b73d41
2022-06-13 13:16:53 +00:00
Paul Duffin
5c24484a50 Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" into tm-dev am: 60c0b9ec9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18801840

Change-Id: Ib7e45cf518950d65e7b87da42a0f5883266b0c5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 12:32:16 +00:00
Paul Duffin
60c0b9ec9c Merge "Treat <x> and <x>_compressed prebuilt APEXes as being equivalent" into tm-dev 2022-06-11 12:13:45 +00:00