Commit Graph

56991 Commits

Author SHA1 Message Date
Paul Duffin
2bf4389d33 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
Merged-In: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
Change-Id: I7aaf16a3a0ab4bebf97765d1484215cc008dc4b8
(cherry picked from commit 4e7d1c43e2)
2022-07-11 21:17:19 +00:00
Paul Duffin
42cdd62d91 Remove support for generating versioned snapshots
(cherry picked from commit b01ac4b6ba)

Previously, the code for selecting specific versions of sdk snapshots
was removed (along with the uses_sdks property). That makes versioned
snapshots useless so this change removes all the code and tests that
generated those versioned snapshots.

Bug: 232546567
Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
Merged-In: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2022-07-11 21:17:19 +00:00
TreeHugger Robot
68e7206340 Merge "Pass pointer to dependencyTag instead of copying struct" into tm-mainline-prod 2022-07-11 19:58:53 +00:00
Paul Duffin
e4713a88cb Pass pointer to dependencyTag instead of copying struct
A follow up change will add some more fields to the tag which will make
passing the struct around by value will get more expensive. Switching
to pointers will make this slightly more efficient.

Changing the type of the tags from dependencyTag to *dependencyTag
broke a test. Rather than simply patch the test and then maybe have to
patch it again in the next change this adds a a String() method that
will insulate the test from being affected by changes in the
dependencyTag contents.

Bug: 232401814
Test: m nothing
Change-Id: I23da742ebffb74ef3b9b68f772519ceb38332f5f
(cherry picked from commit 520917af9d)
Merged-In: I23da742ebffb74ef3b9b68f772519ceb38332f5f
2022-07-11 17:36:50 +00:00
Liz Kammer
7b71083e35 Handle multiple linkages in sdk snapshots
Currently, if the same library is specified for multiple of native_libs,
native_shared_libs, and native_static_libs for different arch/oses,
there can be a few errors:

1. specifying a .so file as `srcs` within a cc_prebuilt_library rather
than being specified only for shared
2. the final type of prebuilt library is dependent on the arch/os

This change introduces:
* an ability for a member type to override the type for specified
  properties
  * checks for a library being used with incompatible member types
  * basing linkage nesting on the member type in addition to variants

  This will ensure that the correct library type is used, regardless of
  the order of iteration over oses/arches, and support nesting linkages
  where necessary but only one linkage variant exists.

Test: soong tests
Test: CI
Change-Id: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
(cherry picked from commit 96320dfff8)
Merged-In: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
2022-07-11 17:21:40 +00:00
Lukacs T. Berki
537b550ee3 Remove memberInterVersionMutator.
paulduffin@ says it's not necessary anymore.

Test: Presubmits.
Bug: 232546567
Change-Id: I6ac69fbdc7a202ac54f250ea6cde0ea99d75864c
(cherry picked from commit ab392edc47)
Merged-In: I6ac69fbdc7a202ac54f250ea6cde0ea99d75864c
2022-07-11 17:21:37 +00:00
Paul Duffin
09bb15da5e Merge "Stop exporting systemserverclasspath_fragment when targeting S" into tm-dev am: 0147aca453
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19135262

Change-Id: I9039499819e938deb9d13557bdee26fc56bd6f4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 17:21:58 +00:00
Paul Duffin
0147aca453 Merge "Stop exporting systemserverclasspath_fragment when targeting S" into tm-dev 2022-07-07 17:03:51 +00:00
Alexei Nicoara
d4ba42e01c Passing default version to zipApex as well
Test: presubmit
Bug: 231691643
Change-Id: Ic751d7ea2d23180855897702a03bf1b589d7ef80
(cherry picked from commit c939b0181d)
Merged-In: Ic751d7ea2d23180855897702a03bf1b589d7ef80
2022-07-07 08:44:00 +00:00
Kousik Kumar
224384434e [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 040867f3b8 -s ours am: 33cc93f02f -s ours
am skip reason: subject contains skip directive

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

Change-Id: I06eae35177dbe0fcc04c85e9360d440284855219
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 21:35:15 +00:00
Kousik Kumar
33cc93f02f [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 040867f3b8 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I662d4c403ec76097fafa6b4be2fe89dcb3ac7f8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 21:16:51 +00:00
Paul Duffin
b0c28d63d6 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.

The Merged-In value was chosen to prevent this from being merged into
branches where it will conflict due to https://r.android.com/2105804.
That will allow this change to be submitted in tm-dev before it is
submitted in AOSP.

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
Merged-In: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2022-07-05 14:48:09 +00:00
Alexei Nicoara
75bc7c8521 Merge "Removing comment lines from apex_manifest.json" into tm-mainline-prod 2022-07-05 12:38:58 +00:00
Dan Willemsen
71b2daf9da Fix some problems with soong metrics loading
If we didn't need to run soong_build during the current run, we still
try to load the soong metrics. But in the case of `dist`, that's in a
directory that is not guaranteed to persist between runs.

Make loading the soong metrics optional if the file does not exist. Also
fixes a variable shadowing issue that meant we never passed it into
ctx.Metrics.

Test: treehugger
Change-Id: Ic836282f4d13e91daa0e7241ad7c488de3293d8b
(cherry picked from commit de3604453f)
Merged-In: Ic836282f4d13e91daa0e7241ad7c488de3293d8b
2022-07-01 22:03:55 +00:00
Alexei Nicoara
606eee9ca2 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
(cherry picked from commit ee4b633627)
Merged-In: Iec8c9987edf19b763b2b87df7d125c006ffb217a
2022-07-01 14:39:59 +00:00
TreeHugger Robot
224fbdb596 [automerger skipped] Merge "Cleanup RBE logs directory" into tm-dev am: 4f7e82f1ce -s ours
am skip reason: Merged-In I46bd38d50419cb9e54e8202d24222979e47ff5ca with SHA-1 29cbe14265 is already in history

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

Change-Id: I4e24ecd0afb3236a530293d9df64c3ddaf8c9c69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 18:24:30 +00:00
Kousik Kumar
930e74ce0a [automerger skipped] Cleanup RBE logs directory am: c3d9ea5a54 -s ours
am skip reason: Merged-In I46bd38d50419cb9e54e8202d24222979e47ff5ca with SHA-1 29cbe14265 is already in history

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

Change-Id: I1f4fa0aa71e957c9479bc1ad50782205ef97bf06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 18:24:29 +00:00
TreeHugger Robot
4f7e82f1ce Merge "Cleanup RBE logs directory" into tm-dev 2022-06-30 18:01:42 +00:00
Kousik Kumar
040867f3b8 [RESTRICT AUTOMERGE] Cleanup RBE logs directory
RBE logs directory is currently messy:
1. We use RBE_output_dir variable to specify where rbe_metrics.txt /
   rbe_metrics.pb file should go to.
2. We use proxy_log_dir to specify where *.rpl / *.rpi (detailed per
   action info log file) should go to.
3. We use RBE_log_dir to specify where reproxy.* / bootstrap.* log files
   should go to.

Ideally, all RBE related logs should go to one single directory. In this
CL, I'm creating a temporary log directory under out/soong/.temp/rbe/
where all RBE related log files per build would go to. The log dir
prefix is also being set to the same prefix as the socket address file.

Test: Ran a sample build with `m libc` and ensured that logs are getting
cleared across rebuilds and that `rbe_metrics.pb` file is properly
generated and being copied to the right location (i.e., from
out/soong/.temp/rbe/<rand> to out/ dir)

Bug: b/233382420
Bug: b/236909178
Bug: b/235861862

Merged-In: I46bd38d50419cb9e54e8202d24222979e47ff5ca
Change-Id: I46bd38d50419cb9e54e8202d24222979e47ff5ca
(cherry picked from commit 29cbe14265)
2022-06-30 15:20:48 +00:00
Alexei Nicoara
3e3ffa016b Merge "Passing the default apex version to the apexer" into tm-mainline-prod 2022-06-30 09:48:23 +00:00
Paul Duffin
029d72027d Avoid modifying Compile_dex property
Previously, the code would modify the Compile_dex property to set it to
true if the module was part of an APEX as the APEX needs the dex file.
That lost information about whether the Compile_dex property was
specified in the .bp file and also meant that the APEX variant had
different properties to other variants which could result in unexpected
differences in behavior between them.

One of those differences can occur in the sdk snapshot generation code
which uses the Compile_dex property to determined whether to write a
compile_dex property in the generated snapshot. If it uses an APEX
variant then it will always add compile_dex: true but if it used a non
APEX variant then it would depend on the setting of compile_dex in the
source. That leads to the generated snapshot being affected not just
by the set of modules that are included but also how they were
specified.

This change stops modifying the properties and just uses a local
variable to store the updated value. All the other (4) uses of the
Compile_dex property were checked and 1 accesses the property before
it is updated, 2 access the property from a module type (Import) that
does not update the property and the other is in the sdk snapshot
generation code which accesses it after it has been modified but needs
to access the unmodified value.

This is needed for the follow up change that allows an sdk module to
reference an apex to automatically add exportable parts of the apex
contents to the sdk snapshot avoiding duplication which can lead to
errors.

Bug: 232401814
Test: m nothing
Change-Id: Ibc80d93473a266dc9f9900ec1cb175b51460b5e9
(cherry picked from commit e7b1f5b0a5)
Merged-In: Ibc80d93473a266dc9f9900ec1cb175b51460b5e9
2022-06-29 18:17:36 +00:00
Alexei Nicoara
81c23549a5 Passing the default apex version to the apexer
Test: presubmit
Bug: 231691643
Change-Id: I900a6acde9f212bf785b0be35f422416c8b62792
(cherry picked from commit 3f8cbcb82c)
Merged-In: I900a6acde9f212bf785b0be35f422416c8b62792
2022-06-29 16:15:53 +00:00
TreeHugger Robot
9a443c17c5 Merge "Add protected_properties support in defaults modules" into tm-mainline-prod 2022-06-28 20:54:34 +00:00
Kousik Kumar
842b46959e [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265 am: 905d2ed5d7 -s ours am: f75e6a131b -s ours am: 29781b6a41 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ic4eabd1787adf089d4f834d07f5a124cdbc5a488
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:47:43 +00:00
Kousik Kumar
d6137a1f7c [automerger skipped] Pass along local resource fraction to reproxy am: dbc313375a am: 3f87c8cd8b am: 60b79a39f5 -s ours am: 7e0aec24ac -s ours
am skip reason: Merged-In I118bc10109f5a55df7a6c1ecd79499320055f2ed with SHA-1 dbc313375a is already in history

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

Change-Id: I67ca526edf04e69647df3ac7cf799d8273613fb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:47:37 +00:00
Kousik Kumar
882aed66e7 [automerger skipped] Do not dump metrics if reproxy was never started am: 5990257d46 am: 1145dd81a7 am: f3d2edfd4b -s ours am: b107bfb634 -s ours
am skip reason: Merged-In Ic3403331e1f4ac2c7c72fd9169aa7b82a7545c75 with SHA-1 5990257d46 is already in history

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

Change-Id: I4b6b2709d69a6c66498972d035263680516e51ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:47:31 +00:00
Kousik Kumar
fb2b9acadc [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265 am: b8a8d8bb2c -s ours am: a63d2406a6 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ie66f4aceb87df18f3caca45bf6b03573e7f9f40e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:47:25 +00:00
Kousik Kumar
4a6a94db97 [automerger skipped] Pass along local resource fraction to reproxy am: dbc313375a am: 0db3027fb7 -s ours am: 1a3e516781 -s ours
am skip reason: Merged-In I118bc10109f5a55df7a6c1ecd79499320055f2ed with SHA-1 35faaef43e is already in history

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

Change-Id: Iab708b7fbaeb8b8fe1bc282ea536510d653b3598
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:47:02 +00:00
Kousik Kumar
569208833b [automerger skipped] Do not dump metrics if reproxy was never started am: 5990257d46 am: 24a39050fd -s ours am: 3b3b252748 -s ours
am skip reason: Merged-In Ic3403331e1f4ac2c7c72fd9169aa7b82a7545c75 with SHA-1 a1d8fa9961 is already in history

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

Change-Id: Ie62f6407cdefa679f87272beaae87b7f3f41aed0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:46:39 +00:00
Kousik Kumar
29781b6a41 [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265 am: 905d2ed5d7 -s ours am: f75e6a131b -s ours
am skip reason: subject contains skip directive

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

Change-Id: I5990530f2640d3c27a25d000d1f013d076ae7393
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:46:27 +00:00
Kousik Kumar
7e0aec24ac [automerger skipped] Pass along local resource fraction to reproxy am: dbc313375a am: 3f87c8cd8b am: 60b79a39f5 -s ours
am skip reason: Merged-In I118bc10109f5a55df7a6c1ecd79499320055f2ed with SHA-1 dbc313375a is already in history

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

Change-Id: Id20bee6da04d47e745789cf85ba6be85be04427e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:46:21 +00:00
Kousik Kumar
b107bfb634 [automerger skipped] Do not dump metrics if reproxy was never started am: 5990257d46 am: 1145dd81a7 am: f3d2edfd4b -s ours
am skip reason: Merged-In Ic3403331e1f4ac2c7c72fd9169aa7b82a7545c75 with SHA-1 5990257d46 is already in history

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

Change-Id: If4f3a1c4d04a2cf8d19b4a7fe82fe830fee576d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:46:13 +00:00
Kousik Kumar
f75e6a131b [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265 am: 905d2ed5d7 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I9554aa900081e0d20dcb5c78b79d60e9d32591a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:55 +00:00
Kousik Kumar
60b79a39f5 Pass along local resource fraction to reproxy am: dbc313375a am: 3f87c8cd8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049588

Change-Id: I79014a559f1c48fb34cc62381dc95ca763a0b672
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:49 +00:00
Kousik Kumar
a63d2406a6 [automerger skipped] [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265 am: b8a8d8bb2c -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ib02db70a8e86da04606f418952a027f798563708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:42 +00:00
Kousik Kumar
1a3e516781 [automerger skipped] Pass along local resource fraction to reproxy am: dbc313375a am: 0db3027fb7 -s ours
am skip reason: Merged-In I118bc10109f5a55df7a6c1ecd79499320055f2ed with SHA-1 35faaef43e is already in history

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

Change-Id: Id2282f6f1150c29c6297c216181ccd933e8e9c28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:35 +00:00
Kousik Kumar
f3d2edfd4b Do not dump metrics if reproxy was never started am: 5990257d46 am: 1145dd81a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049587

Change-Id: Ibdf61b445a1b6b11fb81a8021945e0a849a97a6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:33 +00:00
Kousik Kumar
3b3b252748 [automerger skipped] Do not dump metrics if reproxy was never started am: 5990257d46 am: 24a39050fd -s ours
am skip reason: Merged-In Ic3403331e1f4ac2c7c72fd9169aa7b82a7545c75 with SHA-1 a1d8fa9961 is already in history

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

Change-Id: I2325c832ab78efcd40b779f665f239ed26baa8d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:25 +00:00
Kousik Kumar
905d2ed5d7 [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049589

Change-Id: Ia42f4c8b6e36db233e4dbdb660ef7bc6db8d7933
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:03:26 +00:00
Kousik Kumar
3f87c8cd8b Pass along local resource fraction to reproxy am: dbc313375a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049588

Change-Id: Ife8306fa56df31d9c023436d32765fbe14fbff22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:03:11 +00:00
Kousik Kumar
1145dd81a7 Do not dump metrics if reproxy was never started am: 5990257d46
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049587

Change-Id: I814eaefcad669f9dcdf723e857815cbfa1c44ff7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:02:56 +00:00
Kousik Kumar
b8a8d8bb2c [RESTRICT AUTOMERGE] Cleanup RBE logs directory am: 29cbe14265
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049589

Change-Id: I0124f015b9c9d1abc829b54fb29549599d58b0df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:02:24 +00:00
Kousik Kumar
0db3027fb7 Pass along local resource fraction to reproxy am: dbc313375a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049588

Change-Id: If103a5d9b9d2a8e544d7aab8b6120fd6dad190a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:02:09 +00:00
Kousik Kumar
24a39050fd Do not dump metrics if reproxy was never started am: 5990257d46
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049587

Change-Id: I1e87a465acf447336183df58ffb2c4e21371fcb6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:01:54 +00:00
Paul Duffin
251f5bbab2 Add protected_properties support in defaults modules
Previously, there was no way to prevent a module from overriding a
value provided by a defaults. That made it difficult to ensure
consistency across modules, e.g. for modules that use
framework-module-defaults.

This change adds the protected_properties property to defaults modules
which allows a default module to list those properties that should not
be changed by a module applying those defaults.

Properties can either be listed explicitly by name, or it can just be
a single "*" in which case all properties that are set on the defaults
will be protected.

Bug: 230841626
Test: m nothing
Change-Id: Ibb0e482c2856a572437e7818466f41c5493baf33
(cherry picked from commit 799962789a)
Merged-In: Ibb0e482c2856a572437e7818466f41c5493baf33
2022-06-28 12:04:48 +00:00
TreeHugger Robot
fd0e961f31 Merge "Move embedded notice file path above aapt rule generation" into tm-dev am: 8378feda12
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049995

Change-Id: Ib6f1fb5fdeafc34f913145738853eef219f1d66b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 20:07:51 +00:00
TreeHugger Robot
8378feda12 Merge "Move embedded notice file path above aapt rule generation" into tm-dev 2022-06-23 19:39:53 +00:00
Kousik Kumar
c3d9ea5a54 Cleanup RBE logs directory
RBE logs directory is currently messy:
1. We use RBE_output_dir variable to specify where rbe_metrics.txt /
   rbe_metrics.pb file should go to.
2. We use proxy_log_dir to specify where *.rpl / *.rpi (detailed per
   action info log file) should go to.
3. We use RBE_log_dir to specify where reproxy.* / bootstrap.* log files
   should go to.

Ideally, all RBE related logs should go to one single directory. In this
CL, I'm creating a temporary log directory under out/soong/.temp/rbe/
where all RBE related log files per build would go to. The log dir
prefix is also being set to the same prefix as the socket address file.

Test: Ran a sample build with `m libc` and ensured that logs are getting
cleared across rebuilds and that `rbe_metrics.pb` file is properly
generated and being copied to the right location (i.e., from
out/soong/.temp/rbe/<rand> to out/ dir)

Bug: b/233382420
Bug: b/236909178
Bug: b/235861862

Merged-In: I46bd38d50419cb9e54e8202d24222979e47ff5ca
Change-Id: I46bd38d50419cb9e54e8202d24222979e47ff5ca
2022-06-23 18:30:01 +00:00
Kousik Kumar
29cbe14265 [RESTRICT AUTOMERGE] Cleanup RBE logs directory
RBE logs directory is currently messy:
1. We use RBE_output_dir variable to specify where rbe_metrics.txt /
   rbe_metrics.pb file should go to.
2. We use proxy_log_dir to specify where *.rpl / *.rpi (detailed per
   action info log file) should go to.
3. We use RBE_log_dir to specify where reproxy.* / bootstrap.* log files
   should go to.

Ideally, all RBE related logs should go to one single directory. In this
CL, I'm creating a temporary log directory under out/soong/.temp/rbe/
where all RBE related log files per build would go to. The log dir
prefix is also being set to the same prefix as the socket address file.

Test: Ran a sample build with `m libc` and ensured that logs are getting
cleared across rebuilds and that `rbe_metrics.pb` file is properly
generated and being copied to the right location (i.e., from
out/soong/.temp/rbe/<rand> to out/ dir)

Bug: b/233382420
Bug: b/236909178
Bug: b/235861862

Merged-In: I46bd38d50419cb9e54e8202d24222979e47ff5ca
Change-Id: I46bd38d50419cb9e54e8202d24222979e47ff5ca
2022-06-23 18:27:29 +00:00
Colin Cross
3d6cfd14d3 Move embedded notice file path above aapt rule generation
The embedded notice file generation for apps was moved below the aapt
rules, which meant the added asset path was ignored.  Move the code
to pick the notice file path selection back above the aapt rules,
and leave the code to generate the notice file rule where it is.

Bug: 236006463
Test: m NetworkStack ALWAYS_EMBED_NOTICES=true
Change-Id: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Merged-in: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
2022-06-23 18:05:09 +00:00