Commit Graph

38089 Commits

Author SHA1 Message Date
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
81d56dcd3f Merge "Propagate permitted packages to sdk snapshot" 2021-07-15 14:58:03 +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
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
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
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
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
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
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
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
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
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
Treehugger Robot
5445c84f4d Merge "Export paths for the snapshot modules" 2021-07-14 00:08:12 +00:00
Christopher Parsons
7e8be02166 Merge "Seperate asflags and cflags" am: ace3b7f0a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1764626

Change-Id: I633ff94b7155be285175f5b1d380f74ff0255644
2021-07-13 21:20:35 +00:00
Christopher Parsons
ace3b7f0a2 Merge "Seperate asflags and cflags" 2021-07-13 21:03:27 +00:00
Chris Parsons
69fa9f9e5e Seperate asflags and cflags
This fixes a bug which was a misunderstanding of soong properties:
Soong's cflags pertain only to C and C++ language, whereas bazel's copts
pertain to all three languages. This change ensures that asflags are
added as specifically asflags, and the 'copts' for the static library
macro pertains only to C and C++ languages.

This requires a somewhat hacky workaround for asflags, however: Since
assembly sources also need includepath-related flags, this duplicates
these flags between copts and asflags. To reduce verbosity of
bp2build-generated targets, this also ensures that asflags are omitted
in cases where there are no assembly sources.

Test: Mixed build droid CI
Change-Id: Ic0babed1f90d6dc82e5788638681ce5b995043f8
2021-07-13 14:06:14 -04:00
Yuntao Xu
54fbcf2869 Merge "convert flag options and values in the same line" am: 49e4187e43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1751550

Change-Id: If1ad5e6e940d85afcf22c53a08ff6598e0a50982
2021-07-13 17:27:14 +00:00
Yuntao Xu
49e4187e43 Merge "convert flag options and values in the same line" 2021-07-13 17:11:00 +00:00
Paul Duffin
b1b4d856e1 Add ClassLoaderContextMap.Dump()
Test: n/a
Change-Id: I1e1ad0093301a463d8d03b07cf58710b65e3dc6d
2021-07-13 17:03:50 +01:00
Jeongik Cha
d5fe8782e0 SdkLibraryImport's DexJarInstallPath uses installPath from source module
Even though actual installed module path is the same as source module,
it uses impl's one.

Bug: 188179858
Bug: 193082464
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)
Test: build aosp_cf_x86_64_phone,  launch_cvd, and then
  adb wait-for-device \
      && adb root \
      && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
      and then check if there is no message.

Change-Id: I34ffd9a2d214a6614c2befc35b2beec003cfcd25
2021-07-13 13:54:03 +00:00
Paul Duffin
9054cd9739 Merge "Use bazel syntax for fully qualified name in path property" am: 73c7755ac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1763785

Change-Id: I4b928adda33ae23c93d434d238b81fc6fc9b999e
2021-07-13 13:43:32 +00:00
Paul Duffin
47eec54245 Merge "Stop PathForModuleSrc from validating the paths unnecessarily" am: ccabbfd941
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761490

Change-Id: Id9ab3a565e86ac3ee8e27e4b70fb38b9cbba5161
2021-07-13 13:43:27 +00:00
Paul Duffin
359ab61b5a Merge "Add test to show broken behavior of fully qualified name in path property" am: fc78e2aad9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761489

Change-Id: I677d7cf336ca5625d4d4dd294a189d9155378246
2021-07-13 13:43:21 +00:00
Paul Duffin
73c7755ac9 Merge "Use bazel syntax for fully qualified name in path property" 2021-07-13 13:31:04 +00:00
Paul Duffin
ccabbfd941 Merge "Stop PathForModuleSrc from validating the paths unnecessarily" 2021-07-13 13:30:55 +00:00
Paul Duffin
fc78e2aad9 Merge "Add test to show broken behavior of fully qualified name in path property" 2021-07-13 13:30:44 +00:00
Pedro Loureiro
0e689980e2 Merge "make system server modules use filtered lint database" am: 49e0e81155
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1756510

Change-Id: I057f0fba2989eb08cd701b34f015c983111d9f44
2021-07-13 09:12:26 +00:00
Treehugger Robot
4ba5a02a4d Merge changes from topic "vendor_snapshot-192647618" am: da70df7277
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1755250

Change-Id: I1d13f3729a3815d6e97ca40186600b43bbc6f4a2
2021-07-13 09:11:41 +00:00
Pedro Loureiro
49e0e81155 Merge "make system server modules use filtered lint database" 2021-07-13 08:55:13 +00:00
Treehugger Robot
da70df7277 Merge changes from topic "vendor_snapshot-192647618"
* changes:
  cc/cc.go: Harden GetSnapshot() against nil pointer panic
  cc/cc.go: Add Device() method to LinkableInterface
2021-07-13 08:54:11 +00:00