Commit Graph

5034 Commits

Author SHA1 Message Date
Colin Cross
be076a0c7e Merge "Make FirstTarget treat HostCross separately from Host" am: 0243999864
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2160016

Change-Id: I879353c72a52b0ed98c39dfbf9ae5b278209198e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 16:26:07 +00:00
Colin Cross
c5d7ad6b68 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.

Bug: 236052820
Test: cross compile linux_musl-arm64
Change-Id: If75790001afe9d0f9d4d8166f207847851812297
2022-07-19 14:44:34 -07: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
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
Romain Jobredeaux
7756759ee9 Merge "Enable Java in mixed builds." am: b3e7dfbd80
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2124255

Change-Id: Ie2bb5ca84a5e361b3243d38d550de1135b6a3888
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 15:08:13 +00:00
Romain Jobredeaux
2919797aaa Enable Java in mixed builds.
Allowlist manual BUILD files in prebuilts/bazel for
the toolchain setup.

Test: b build build/bazel/examples/java/...
Change-Id: Id649dce631731e5396da4a9fe224e33f8949dd7d
Bug: 196441639
2022-07-17 19:38:23 -07:00
Paul Duffin
7d92232f3a Merge "Use implementation jar for updatable-media in snapshot for S" am: b262f883a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2155558

Change-Id: If34798d721c41308a99271e11a440c0b3e2a46e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 22:51:16 +00:00
Paul Duffin
b262f883a9 Merge "Use implementation jar for updatable-media in snapshot for S" 2022-07-15 22:32:58 +00:00
Bob Badour
c5d7b6a711 Merge "Keep Notice property from erasing license texts." am: eea1696332
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153979

Change-Id: Iac6e594eb861671db0e1bf2c5c81de54b9e85486
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 21:43:36 +00:00
Bob Badour
eea1696332 Merge "Keep Notice property from erasing license texts." 2022-07-15 21:24:03 +00:00
Paul Duffin
1364891fad Use implementation jar for updatable-media in snapshot for S
While enabling prebuilts in T we hit b/229932396 which was caused by
some parts of the build depending on the prebuilt updatable-media jar
which used to be a full implementation jar but which is now an invalid
jar as the snapshot must not be including implementation details. We
fixed the issue in T but we are hitting the same problem in S with the
M-2022-07.

That is the first train in which the prebuilt updatable-media module
provides an invalid jar, prior to that it was always providing an
implementation jar. This change tweaks the sdk snapshot generation
code to use an implementation jar for updatable-media in the S
snapshot to avoid partners having to cherry pick changes similar to
those needed to fix b/229932396 in T.

Bug: 239121291
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Check that S media snapshot includes implementation jar.
      # Check that S art snapshot includes invalid jar.
      # Check that T media snapshot includes invalid jar.
Change-Id: Ib49484d00a60b4ed7f8268e04f9c10a3498edb56
2022-07-15 17:23:10 +00:00
Christopher Ferris
65ba6bf8ca Merge "Add ability to force compile as 64 bit." am: 70019a90be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153453

Change-Id: I251bc9b89ccc173d1bf694d3fea7b44e8da28049
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 22:42:50 +00:00
Christopher Ferris
98f102269d Add ability to force compile as 64 bit.
When trying to build a single 64 bit and 32 bit image, there are
a few executables that are prefer32. When set, this will force all
of those targets to be compiled as 64 bit.

Test: With this option, drmserver/mediaserver are built as 64 bit.
Test: Without this option, drmserver/mediaserver are built as 32 bit.
Change-Id: I1c3dbe229f9b612ff76b857ca7163b14e7dc92c5
2022-07-14 13:34:14 -07:00
Bob Badour
9f847581b7 Keep Notice property from erasing license texts.
Remove "default to file in directory". Use explicit applicable license.

Bug: 192434786

Test: m droid dist

Change-Id: Id3d845b2073f151a8c0bad874e7ab005771bdfcb
2022-07-14 10:40:01 -07:00
William Loh
b6d77a7652 Merge "Propagate max_sdk_version to manifest_fixer" am: 50dbe0a074
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2104965

Change-Id: If87b6e5740ae3bd2f90c57b096ac358f0f84ba08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 00:38:35 +00:00
William Loh
50dbe0a074 Merge "Propagate max_sdk_version to manifest_fixer" 2022-07-14 00:20:35 +00:00
Trevor Radcliffe
973b6038d4 Allowlist sysprop commands for bp2build am: c7ceb43195
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151840

Change-Id: I2908ccc56ceb8b799611be3a0b9ab3c5acfcea74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 19:44:34 +00:00
Trevor Radcliffe
c7ceb43195 Allowlist sysprop commands for bp2build
Bug: 235131252
Test: Build the commands in this directory
Change-Id: I0292ee7158c199daf5536015a9d04c4a57e2e618
2022-07-13 17:10:45 +00:00
Liz Kammer
45faf8f427 Implement bp2build for linker_config
Pair: agespino
Bug: 211666695
Test: TODO
Change-Id: I479bcd7c53b1c57563fb4277ec39ad70b16030b8
2022-07-08 16:09:40 +00:00
Mu-Le Lee
85155c8ada Move LLNDK ABI dumps from vndk/ to platform/
Since vndk libraries don't need to maintain Cross-Version abi
compatibility. The newly proposed Cross-Version ABi checking mechanism
is applied to only ndk/ and platform/. The reference dumps of LLNDK
libraries should get from platform/ to be benefited from this checking
mechanism.

Test: mkdir -p prebuilts/abi-dumps/platform/UpsideDownCake/64/x86_64/source-based/ && cp prebuilts/abi-dumps/vndk/32/64/x86_64/source-based/libvndksupport.so.lsdump "$_"
      make libvndksupport -j
Bug: 238383845
Change-Id: I663511d60623cd23619166d8d63fd26220a930e2
2022-07-08 08:17:29 +00: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
Sasha Smundak
18841c3aa6 Clean up bazel_handler.go am: b43ae1eec5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2144600

Change-Id: I62e8112c4823fe88bde444ac4027a50d25972cf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 04:41:23 +00:00
Sasha Smundak
f068e16c33 Handle SymlinkTree action, ignore PythonZipper action. am: c180dbd4c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2144599

Change-Id: I62a635529b8e7a10c63ea34d157cfd8bc9d8dcb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 21:08:56 +00:00
Sasha Smundak
ea1f08cc55 Handle WriteFile and SourceSymlinkManifest actions. am: 1da064c1e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2121035

Change-Id: I696b7b3836f2b8a7b68facd0bd75083fcdc5a59e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 21:08:52 +00:00
Sasha Smundak
b43ae1eec5 Clean up bazel_handler.go
Suppress progress and informational messages when invoking Bazel.
Fix Go compiler warnings (unused arguments, etc.)

Test: treehugger
Change-Id: I148bcd200243b4ccb60026264afc4f5b393b82e9
2022-07-06 11:30:40 -07:00
Sasha Smundak
c180dbd4c7 Handle SymlinkTree action, ignore PythonZipper action.
Introduce bazelBuildRunfiles to build runfiles symlink tree, allowing to
ignore a bogus PythonZipper action.

Bug: 232085015
Test: treehugger
Change-Id: I81267f523d8237fddbc7d65955cdd08ea6369046
2022-07-06 11:30:40 -07:00
Sasha Smundak
1da064c1e6 Handle WriteFile and SourceSymlinkManifest actions.
Plus minor editorial changes.

Bug: 232085015
Test: treehugger
Change-Id: I966e9d6d306382dbb8eac6f8a495a2f152c7a22e
2022-07-06 11:30:40 -07: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
Paul Duffin
e942d5d7e9 Merge "Stop exporting systemserverclasspath_fragment when targeting S" am: 014fded49d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2143673

Change-Id: I2ad06eae7d11f1ef9ae7727a5a41052d48fc9e44
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-05 17:15:57 +00:00
Paul Duffin
014fded49d Merge "Stop exporting systemserverclasspath_fragment when targeting S" 2022-07-05 16:44:10 +00:00
Paul Duffin
f861df7907 Stop exporting systemserverclasspath_fragment when targeting S
Previously, when targeting the S release the generated sdk snapshot
would contain prebuilt_systemserverclasspath_fragment modules even
though they were only added in T.

This allows SdkMemberTypes to specify the set of target build releases
they support and ignores them when targeting an unsupported target
build release.

Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
      # Check that the for-S-build snapshots do not include SSCPFs.
Bug: 237718221
Change-Id: I2df08c2fcebf9b866695d691572a9d3783758b17
2022-07-05 15:13:09 +00:00
Treehugger Robot
b11e63c05b Merge "Remove min_sdk_version allowlist" am: ca51d6e7e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2138334

Change-Id: Ifa9ab0026e8bf7a73050739f31ebdac35862d836
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-04 14:30:01 +00:00
Treehugger Robot
ca51d6e7e6 Merge "Remove min_sdk_version allowlist" 2022-07-04 14:01:20 +00:00
Cole Faust
2b4402d43f Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" am: 100c7ad7f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2143082

Change-Id: I393938d1bf83b8dc734761679fbd5df10caf1c93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 23:06:03 +00:00
Cole Faust
100c7ad7f2 Merge "Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"" 2022-07-01 22:48:49 +00:00
Cole Faust
e5bf3fb4c2 Revert^2 "Fix erroneous "Field requires API level 33 (current min is 32)" warnings"
This reverts commit 5d80d895b6.

Reason for revert: The issue that broke the build the first time this was submitted has been fixed in ag/19125702. Also the errorprone build was added to presubmit for changes to these files so we should hopefully catch any other issues at presubmit now: cl/458501206

Change-Id: I80ca08df49c58a1ad70de917822301368d49fc67
2022-07-01 19:39:14 +00:00
Treehugger Robot
804d04f36d Merge "Allowlist more cc mainline modules blockers" am: d9cb4b746c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132795

Change-Id: Id89b82571da8dc904d254cc7f761226106ad45ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 19:10:12 +00:00
Treehugger Robot
d9cb4b746c Merge "Allowlist more cc mainline modules blockers" 2022-07-01 18:53:07 +00:00
Treehugger Robot
9fe821b0c6 Merge "Don't pass host cross linux musl modules to Make" am: f47fe38686
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139099

Change-Id: I97e79b3df1e605d20276f06c407a3ce74a1edfd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 17:37:55 +00:00
Treehugger Robot
f47fe38686 Merge "Don't pass host cross linux musl modules to Make" 2022-07-01 17:11:41 +00:00
Liz Kammer
63367e1da9 Allowlist more cc mainline modules blockers
Test: mixed_droid.sh
Change-Id: Ice133b88d3420d9b976d1632da3e7e5da6bb5c3c
2022-07-01 12:33:59 -04:00
Treehugger Robot
f4da9403f3 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75 am: 4d2f767217
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139101

Change-Id: I35551b07799c29cb56e2ffdaf7c1693b23f4f8d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 13:10:11 +00:00
Treehugger Robot
4d2f767217 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75
* changes:
  Pass -fno-sanitize=vptr,function for musl
  Use musl rust prebuilts for USE_HOST_MUSL=true
  Don't package host cross modules in javaFuzzPackager
  Add rust musl arm and arm64 toolchains
2022-07-01 12:46:58 +00:00
Sasha Smundak
966994af92 Reformat the test to make them more readable. am: e3cf1abefc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142353

Change-Id: I5dc19256f8603101845dc56a53b87902049e3042
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 23:30:24 +00:00
Sasha Smundak
e3cf1abefc Reformat the test to make them more readable.
Test: treehugger
Change-Id: I28ccd531a5dadcee3cbdebd5f5ba6db1605662d9
2022-06-30 14:20:55 -07:00
Usta Shrestha
5cc4165702 Merge "null build upon repeated mixed build" am: 86363835ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095253

Change-Id: I08d32ec6550688fce86631a942add1de2d243392
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 14:31:15 +00:00
Usta Shrestha
86363835ae Merge "null build upon repeated mixed build" 2022-06-30 14:11:20 +00:00
Sasha Smundak
ab8c3df31a Fix config string for the generic target. am: 9d46dcf908
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2121034

Change-Id: I7a11aae2cab98e774696a15e8fa65ba485461e13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 05:52:59 +00:00
Sasha Smundak
9d46dcf908 Fix config string for the generic target.
For the generic target (i.e, arch == "common" and os == Device), the config
 string should be "target|common", not "x86_64|common".
 Also renamed local variable from `os`.

Bug: 232085015
Test: treehugger
Change-Id: I36e696203f207dd295ed7f109b7c07b576ebf3c2
2022-06-29 18:30:36 -07:00