Commit Graph

44048 Commits

Author SHA1 Message Date
Paul Duffin
cc7fc33e20 Merge "Build updatable-bcp-packages.txt from prebuilts in sdk snapshot" am: d2a23518b4 am: 3caa3a02ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768127

Change-Id: I0f1bd5d1a6d53d12f9af41b46af3453af24c0591
2021-07-15 15:23:27 +00:00
Paul Duffin
2be643b605 Merge "Propagate permitted packages to sdk snapshot" am: 81d56dcd3f am: fcbeaa37a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768128

Change-Id: I71487b6536f93a0dbbf121ff45f5737858f3d373
2021-07-15 15:23:17 +00:00
Paul Duffin
3caa3a02ee Merge "Build updatable-bcp-packages.txt from prebuilts in sdk snapshot" am: d2a23518b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768127

Change-Id: Icfd614f4ec1ae722e742cbf98eb58a2a71d09f1d
2021-07-15 15:10:44 +00:00
Paul Duffin
fcbeaa37a8 Merge "Propagate permitted packages to sdk snapshot" am: 81d56dcd3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768128

Change-Id: I0319ea86d5d966892a6b02c6a52100475306c056
2021-07-15 15:10:38 +00:00
Paul Duffin
d2a23518b4 Merge "Build updatable-bcp-packages.txt from prebuilts in sdk snapshot" 2021-07-15 14:58:12 +00:00
Paul Duffin
81d56dcd3f Merge "Propagate permitted packages to sdk snapshot" 2021-07-15 14:58:03 +00:00
satayev
4619a2bdd5 Merge "Update a comment about PRODUCT_UPDATABLE_BOOT_JARS." am: 1180b1fc4a am: 8ed574e839
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768126

Change-Id: I3b36e57d068a35902c256bf84b3150f435031103
2021-07-15 14:33:25 +00:00
satayev
8ed574e839 Merge "Update a comment about PRODUCT_UPDATABLE_BOOT_JARS." am: 1180b1fc4a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768126

Change-Id: Ia6ef4362685a21790d926c6e749e7ea343ce873e
2021-07-15 14:15:31 +00:00
satayev
1180b1fc4a Merge "Update a comment about PRODUCT_UPDATABLE_BOOT_JARS." 2021-07-15 14:01:38 +00:00
Liz Kammer
a61eb1ef15 Merge "Include bazel-status of build in metrics" am: da29c65eb6 am: 7bce37e093
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1766626

Change-Id: Idfabd2ddef04edd822ea236615adb3ff2480cef2
2021-07-15 13:30:17 +00:00
Paul Duffin
630b11e9d4 Build updatable-bcp-packages.txt from prebuilts in sdk snapshot
Previously, the java_import and java_sdk_library_import modules did not
make their permitted_packages available to the rule that generates the
updatable-bcp-packages.txt file. This change corrects that.

Bug: 193763688
Test: m nothing
      - Added unit tests, which all failed and then fixed the tests.
Change-Id: If0706e4551a331b48d383123088e63924dded48b
2021-07-15 14:16:44 +01:00
Liz Kammer
7bce37e093 Merge "Include bazel-status of build in metrics" am: da29c65eb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1766626

Change-Id: I3452f7976a18fbc85eb47cabe701b0b3260c0b3b
2021-07-15 13:16:30 +00:00
Paul Duffin
869de147ab Propagate permitted packages to sdk snapshot
Previously, permitted_packages were not copied to the sdk snapshot.
This change corrects that.

Bug: 193763688
Test: m nothing
      - Added unit tests, which all failed and then fixed the tests.
Change-Id: I4560987f746f78c0ae706058195b6db4bea438aa
2021-07-15 14:15:58 +01:00
Liz Kammer
da29c65eb6 Merge "Include bazel-status of build in metrics" 2021-07-15 12:58:04 +00:00
satayev
f208a5766e Update a comment about PRODUCT_UPDATABLE_BOOT_JARS.
Bug: 191127295
Test: n/a
Change-Id: I3d8e8689a79be79714b01cfd8abac34e7d963aee
2021-07-15 13:22:31 +01:00
Treehugger Robot
55ac43fbd5 Merge "Update comment text of SrcIsModuleWithTag()" am: f6ecb09322 am: bb3206b0eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1767845

Change-Id: If85eca8820df23e25d7710f1d0bbf42dfa2209da
2021-07-15 12:06:55 +00:00
Treehugger Robot
bb3206b0eb Merge "Update comment text of SrcIsModuleWithTag()" am: f6ecb09322
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1767845

Change-Id: Idecc8d9544b5095510903b146f490a410abf39dd
2021-07-15 11:40:19 +00:00
Treehugger Robot
f6ecb09322 Merge "Update comment text of SrcIsModuleWithTag()" 2021-07-15 11:24:19 +00:00
Ulya Trafimovich
0177d33204 [automerger skipped] Drop "prebuilt_" prefix when adding libraries to class loader context. am: fa20b187dc -s ours
am skip reason: Merged-In Icc42533d9915060d7fffda12aa93b9d18dc4f83d with SHA-1 69c1aa94ac is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15296451

Change-Id: Ib8ba003025ad28fe70275d5041ae4a9017b46f94
2021-07-15 11:15:04 +00:00
Ulyana Trafimovich
7af46fabf6 Merge "Drop "prebuilt_" prefix when adding libraries to class loader context." am: bd14f9a952 am: d47262c529
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1765982

Change-Id: Iac7a5b0a7a975b641e3b589915a5915f26d3418d
2021-07-15 10:50:24 +00:00
Ulyana Trafimovich
732d7c431a Merge "Drop strings.HasPrefix when guarding strings.TrimPrefix." am: 7beb099546 am: cdaf15d04f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1765983

Change-Id: Ie6342e568e443a13eb840afb218dbb5a3931467d
2021-07-15 10:50:16 +00:00
Ulyana Trafimovich
d47262c529 Merge "Drop "prebuilt_" prefix when adding libraries to class loader context." am: bd14f9a952
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1765982

Change-Id: Ic6459e82ac8cd6ddc8aadfe79212a456b4eb847e
2021-07-15 10:26:58 +00:00
Ulyana Trafimovich
cdaf15d04f Merge "Drop strings.HasPrefix when guarding strings.TrimPrefix." am: 7beb099546
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1765983

Change-Id: Ia1ddb9ca2404e369ab2f2352ccb653bf045fe2fe
2021-07-15 10:26:51 +00:00
Ulya Trafimovich
fa20b187dc Drop "prebuilt_" prefix when adding libraries to class loader context.
This is needed when some source libraries get replaced with prebuilt
variants: CLC should contain one entry for a library (the prebuilt one
or the source one, whichever of them is preferred). Because the prebuilt
module name starts with "prebuilt_" prefix, previously Soong considered
such libraries as two different ones libraries and added both to CLC.

Bug: 193425964

Test: mark "prebuilt_android.net.ipsec.ike" as preferred and `m nothing`
      (before this CL it would fail the build, now it builds fine).

Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd
      $ adb wait-for-device && \
        adb root && \
        adb logcat | \
        grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
      # empty output, no errors
Change-Id: Icc42533d9915060d7fffda12aa93b9d18dc4f83d
Merged-In: Icc42533d9915060d7fffda12aa93b9d18dc4f83d
(cherry picked from commit 69c1aa94ac)
2021-07-15 11:17:24 +01:00
Ulyana Trafimovich
bd14f9a952 Merge "Drop "prebuilt_" prefix when adding libraries to class loader context." 2021-07-15 10:15:44 +00:00
Ulyana Trafimovich
7beb099546 Merge "Drop strings.HasPrefix when guarding strings.TrimPrefix." 2021-07-15 10:15:26 +00:00
Paul Duffin
b4632e545a Merge "Support generating sdk snapshots that can be selected by Soong config vars" am: 4e444dab84 am: 07a807151e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762229

Change-Id: I80b13f39e390fba110de305c9b84902ff386e341
2021-07-15 09:29:51 +00:00
Treehugger Robot
a5d5782e39 Merge "dexpreopt.config should be created even though unbundled image is built" am: 75d719fdd7 am: 1bc89a7af1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1730112

Change-Id: I4e91d1b293e84c69f032e148931357e2a050e10f
2021-07-15 09:28:40 +00:00
Yi-Yo Chiang
ba9ea32f73 Update comment text of SrcIsModuleWithTag()
The actual behavior of the method is slightly different from its text
right now. Update the text to describe the actual behavior.

Bug: 193228441
Test: m nothing (change is noop)
Change-Id: I755829af6aa1b3f95ac71f33d75751b94e71b54b
2021-07-15 17:18:21 +08:00
Paul Duffin
07a807151e Merge "Support generating sdk snapshots that can be selected by Soong config vars" am: 4e444dab84
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762229

Change-Id: I9d566d0024f619586051d59b291a91da8a518be8
2021-07-15 09:09:27 +00:00
Treehugger Robot
1bc89a7af1 Merge "dexpreopt.config should be created even though unbundled image is built" am: 75d719fdd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1730112

Change-Id: I0fd2826925ce20755218342865911fc85a6c60e1
2021-07-15 09:02:23 +00:00
Paul Duffin
4e444dab84 Merge "Support generating sdk snapshots that can be selected by Soong config vars" 2021-07-15 07:59:06 +00:00
Ulya Trafimovich
69c1aa94ac Drop "prebuilt_" prefix when adding libraries to class loader context.
This is needed when some source libraries get replaced with prebuilt
variants: CLC should contain one entry for a library (the prebuilt one
or the source one, whichever of them is preferred). Because the prebuilt
module name starts with "prebuilt_" prefix, previously Soong considered
such libraries as two different ones libraries and added both to CLC.

Bug: 193425964

Test: mark "prebuilt_android.net.ipsec.ike" as preferred and `m nothing`
      (before this CL it would fail the build, now it builds fine).

Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd
      $ adb wait-for-device && \
        adb root && \
        adb logcat | \
        grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
      # empty output, no errors
Change-Id: Icc42533d9915060d7fffda12aa93b9d18dc4f83d
2021-07-15 08:30:27 +01:00
Ulya Trafimovich
497a09310b Drop strings.HasPrefix when guarding strings.TrimPrefix.
There is no need to check as `TrimPrefix` does nothing if the prefix
doesn't match (see https://pkg.go.dev/strings#TrimPrefix).

Bug: 193425964
Test: m nothing
Change-Id: Ieb82e72a471800e29eb6bb54308041a9ab4173e5
2021-07-15 08:30:27 +01:00
Treehugger Robot
75d719fdd7 Merge "dexpreopt.config should be created even though unbundled image is built" 2021-07-15 03:41:30 +00:00
Jeongik Cha
4b073cd083 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I36a6e8b10b9922cc5522accaf90af1aa05049a86
2021-07-15 09:57:49 +09:00
Paul Duffin
fb9a7f99be Support generating sdk snapshots that can be selected by Soong config vars
Allows the builder of an sdk snapshot to specify a Soong config
variable that can be used to control whether the snapshot's prebuilts
are used or not.

Bug: 193523070
Test: m nothing
Change-Id: Ib09500ba61befc1202dff61dc06847c730ba9253
2021-07-14 23:19:53 +01:00
Liz Kammer
ca9cb2e5bd Include bazel-status of build in metrics
Currently within metrics we cannot distinguish between Bazel-involved
configurations:
  Bazel as Ninja vs Ninja as Ninja builds
  Bazel mixed builds vs non-mixed builds

Add these to the build configuration in order to distinguish between and
track them independently.

Test: go soong tests
Test: USE_BAZEL_ANALYSIS=1 m nothing and verify out/soong_metrics
Bug: 193672397
Change-Id: I94ce56c1a98a76d929598d9fe3070df16ffa1376
2021-07-14 17:48:04 -04:00
Paul Duffin
11df6ea178 Merge "Choose prebuilt or source via an Soong config variable" am: e88944c51e am: 435ef09c6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762228

Change-Id: I15d4a2f5754eaa5f2446a82b476175f4e003be5f
2021-07-14 20:58:05 +00:00
Paul Duffin
435ef09c6a Merge "Choose prebuilt or source via an Soong config variable" am: e88944c51e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762228

Change-Id: Ib88e4a9526a74204744d8ddc9110526d30a74e76
2021-07-14 20:45:41 +00:00
Paul Duffin
e88944c51e Merge "Choose prebuilt or source via an Soong config variable" 2021-07-14 20:23:34 +00:00
Paul Duffin
0c52c7ba63 Choose prebuilt or source via an Soong config variable
A simple way to provide fine grained control over the use of a prebuilt
or source module via a Soong config variable.

Bug: 193523070
Test: m nothing
Change-Id: I47ae8ac04fa29156d2e87efd9e60ab995f50ea6d
2021-07-14 20:23:06 +00:00
Treehugger Robot
00c4bcb742 Merge "Add ClassLoaderContextMap.Dump()" am: e04058f291 am: 91214030d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1764532

Change-Id: I3fd93ba0d987d4b381504561993964731401b099
2021-07-14 13:24:20 +00:00
Treehugger Robot
91214030d3 Merge "Add ClassLoaderContextMap.Dump()" am: e04058f291
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1764532

Change-Id: I8759734c99af9306df64dbbf0472b1dfdbfbb294
2021-07-14 13:11:12 +00:00
Treehugger Robot
e04058f291 Merge "Add ClassLoaderContextMap.Dump()" 2021-07-14 12:57:56 +00:00
Treehugger Robot
4c72f68962 Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source module" am: 257608f993 am: 64614bbcff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1758354

Change-Id: Ibd345e6d76706c54d5cfb0799d80f5d107332f78
2021-07-14 01:21:18 +00:00
Treehugger Robot
64614bbcff Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source module" am: 257608f993
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1758354

Change-Id: Icf95690ad0066fa644674151260fb9d170fae278
2021-07-14 01:04:13 +00:00
Treehugger Robot
257608f993 Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source module" 2021-07-14 00:47:40 +00:00
Treehugger Robot
cb656bb1ca Merge "Export paths for the snapshot modules" am: 5445c84f4d am: e7154ca8e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762847

Change-Id: I878703ad9b1f6f2fb36909603023110f9e88cf3a
2021-07-14 00:36:06 +00:00
Treehugger Robot
e7154ca8e7 Merge "Export paths for the snapshot modules" am: 5445c84f4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762847

Change-Id: I5543c2c5f9c2a23e15824a91d4bff7ae35b465a2
2021-07-14 00:23:19 +00:00