Commit graph

72350 commits

Author SHA1 Message Date
Anton Hansson
d69b5ff1b2 Merge "Stop suppressing the ChangedDefault error" into main 2023-11-08 10:23:42 +00:00
Treehugger Robot
2ab031f467 Merge "Export build flags to soong." into main 2023-11-08 04:15:17 +00:00
Inseob Kim
e4e85d5f9f Export build flags to soong.
This exports a map of build flags used in this release config to Soong.

Bug: 302514918
Test: manual
Change-Id: Id95c03e14cfbb91c0cb9c8c37a065b8387733317
2023-11-08 04:01:38 +00:00
Treehugger Robot
6a8eb37d90 Merge "Only enable MLGO for ARM64 ThinLTO targets" into main 2023-11-08 02:51:16 +00:00
Treehugger Robot
a19c9141aa Merge changes from topic "apex-elf-checker" into main
* changes:
  Add check for unwanted_transitive_deps
  Add JoinWithPrefixSuffixAndSeperator() utility
2023-11-08 01:50:01 +00:00
LaMont Jones
2e55729650 Merge "Readd support for PRODUCT_RELEASE_CONFIG_MAPS" into main 2023-11-07 20:12:50 +00:00
Treehugger Robot
29f5f2574d Merge "Create an apex_contributions module type" into main 2023-11-07 19:49:52 +00:00
Treehugger Robot
75f20f38b1 Merge "Sandbox nos genrules" into main 2023-11-07 19:10:19 +00:00
LaMont Jones
9a9128610b Readd support for PRODUCT_RELEASE_CONFIG_MAPS
This allows product config to determine what build flags are present in
a product's build, as well as their value.

As product config moves to a declarative specification, this can be
handled with less unnecessary work.

Bug: b/302593603, b/308849337, b/309477343
Test: manual
Change-Id: Ic0551990864bba6d03b6bf49fcfd4ae2523d9c6d
2023-11-07 18:39:40 +00:00
Anton Hansson
bf3e32d870 Merge "Add a new flag to stop disabling lint errors" into main 2023-11-07 16:01:29 +00:00
Anton Hansson
59ef1ec1f5 Stop suppressing the ChangedDefault error
This will prevent future breakages of this kind, so reenable the check.

Bug: 223382732
Test: m checkapi
Change-Id: I5e67ed45e3a78b90de6884a0d7b0b1c91d58b6f5
2023-11-07 15:44:14 +00:00
Anton Hansson
fd1c0d2eaa Add a new flag to stop disabling lint errors
java_sdk_library has historically suppressed a few legitimate lint
errors. Make it possible to remove these suppressions via a flag.

Bug: 306806877
Test: checkapi
Merged-In: I10577dacbd7ea8063c6e1e02f3b6c60a2bee5094
Change-Id: I10577dacbd7ea8063c6e1e02f3b6c60a2bee5094
2023-11-07 10:14:50 +00:00
Yi Kong
0fa503da2e Only enable MLGO for ARM64 ThinLTO targets
The MLGO model we embed in the Android Clang is trained on ARM64
ThinLTO artefacts. Applying the model across architectures does not
necessarily translate to performance improvement. Therefore only enable
the optimisation on ARM64 ThinLTO for now.

Test: presubmit
Bug: 293827654
Change-Id: Ie64a65c11191cf700a463637a0746c8470d3aa3c
2023-11-07 14:12:51 +09:00
Jooyung Han
55a7306aeb Add check for unwanted_transitive_deps
apex.unwanted_transitive_deps can break the APEX when any of listed deps
is actually needed. To avoid that, a new validation is added to see if
"unwanted" deps are actually not used by any ELF files in the APEX.

The new validation runs only for non-test apexes with
unwanted_transitive_deps set because test apexes can be broken
intentionally.

Bug: 295593640
Test: m com.android.virt
Change-Id: I29a3f7ef76b59594a08cfacca4811f16bf7172cc
2023-11-07 13:09:56 +09:00
Jooyung Han
b0864e086e Add JoinWithPrefixSuffixAndSeperator() utility
Bug: n/a
Test: m blueprint_tests
Change-Id: I0fa5d291ce10d699df787feaf9fdaf667aa22686
2023-11-07 13:08:53 +09:00
Colin Cross
216ed6c918 Merge "Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"" into main 2023-11-06 22:02:50 +00:00
Colin Cross
6a4fe68cc5 Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"
Revert submission 2815850-product-flags

Reason for revert: b/309477343

Reverted changes: /q/submissionid:2815850-product-flags

Bug: 302593603
Bug: 309477343
Change-Id: I5b5a5ade1d85195c43377ed7639deba6eef86e23
2023-11-06 21:32:03 +00:00
LaMont Jones
4c01bb49da Merge "Add support for PRODUCT_RELEASE_CONFIG_MAPS" into main 2023-11-06 14:08:22 +00:00
Alyssa Ketpreechasawat
98e555c842 Merge "Disable verify_overlaps test instead of hiddenapi check." into main 2023-11-06 10:53:31 +00:00
Alyssa Ketpreechasawat
7daf2786b6 Disable verify_overlaps test instead of hiddenapi check.
Disabling hiddenapi check entirely can be dangerous and it might change the
accessibility of @hide Api too. We should only disable verify_overlaps
test which is required for module_sdk and apexes mismatch.

Test: atest CtsInlineMockingTestCases
Bug: 308187068
Bug: 307480026
Change-Id: I44f48e85d802b3a8f2711bc2047bdab721369f08
2023-11-06 09:49:16 +00:00
Cole Faust
9f9921cbc3 Sandbox nos genrules
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: m nos_app_avb_service_genc++ nos_app_avb_service_genc++_headers nos_app_avb_service_genc++_mock nos_app_identity_service_genc++ nos_app_identity_service_genc++_headers nos_app_identity_service_genc++_mock nos_app_keymaster_service_genc++ nos_app_keymaster_service_genc++_headers nos_app_keymaster_service_genc++_mock nos_app_weaver_service_genc++ nos_app_weaver_service_genc++_headers nos_app_weaver_service_genc++_mock nos_generator_test_service_genc++ nos_generator_test_service_genc++_headers nos_generator_test_service_genc++_mock
Change-Id: Ic2c6ff1bbc0037c59b692fd76c9050521812989e
2023-11-03 16:29:21 -07:00
Spandan Das
0d53dd289e Create an apex_contributions module type
This module type does not any build actions, but provides metadata about
the contributions of the mainline module to other mainline modules/
platform. One immediate use case for this metadata is source vs
prebuilts selection

Each mainline module can have more than 1 metadata modules. Static build
flags will be used to select the right one in trunk.bzl, next.bzl, ...

Bug: 308174923
Test: go build ./android
Change-Id: I5ead0c38fe64b78de08db1736d97a8ab7374d6d9
2023-11-03 22:33:02 +00:00
Cole Faust
74639be8a7 Merge "Sandbox LTP genrules" into main 2023-11-03 20:16:00 +00:00
LaMont Jones
127127b608 Add support for PRODUCT_RELEASE_CONFIG_MAPS
This allows product config to determine what build flags are present in
a product's build, as well as their value.

As product config moves to a declarative specification, this can be
handled with less unnecessary work.

Bug: b/302593603
Bug: b/308849337
Test: manual
Change-Id: If57622059bb7d1c33df7498321db621c0c2d30c0
2023-11-03 19:19:59 +00:00
Almaz Mingaleev
92610e18e2 Merge "Add java.util.random to the allowed package list." into main 2023-11-03 14:05:16 +00:00
Michael Stokes
2e09e68e56 Merge "Revert "Use R8 for resource shrinking"" into main 2023-11-03 12:12:40 +00:00
Treehugger Robot
0978d6a4b1 Merge "Update checkapi error message to provide more guidance" into main 2023-11-03 11:13:02 +00:00
Rico Wind
a9fd59a7f2 Revert "Use R8 for resource shrinking"
Revert submission 2816534-r8resourceshrinking

Reason for revert: b/309075997

Reverted changes: /q/submissionid:2816534-r8resourceshrinking

Change-Id: Ic173491eaf22967fbad14fbcc85f6ddb2cf54d23
2023-11-03 10:26:38 +00:00
Rico Wind
4ea88503e4 Merge "Use R8 for resource shrinking" into main 2023-11-03 07:29:45 +00:00
Cole Faust
9cae593d97 Sandbox LTP genrules
gen_ltp_config used to read files from the source tree,
but this cl refactors it to package all the files it
needs into the tool itself, so it's more hermetic and
all the genrules don't need to explicitly list the files
the tool needs.

go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: diff'd the files produced by the ltp_config_* genrules before/after this change
Change-Id: Ia72084965dcb8659394068b7c6877adb1c882dc2
2023-11-02 22:23:01 -07:00
Treehugger Robot
66135a79f4 Merge "Sandbox test apex genrules" into main 2023-11-03 02:11:36 +00:00
Treehugger Robot
81ac6e74df Merge "Remove retrieveLegacyEncodedBootDexFiles" into main 2023-11-03 01:46:13 +00:00
Treehugger Robot
ac8052b61f Merge "Remove UpdatableSystemFontTest modules from sandboxing denylist" into main 2023-11-03 01:36:55 +00:00
Cole Faust
06e73446de Sandbox test apex genrules
With the other cls in this topic, the modules build with sandboxing.
They still fail the genrule_sandobox_test.py because their builds are
non-deterministic though. I wasn't able to find the cause of the
non-determinism, so relying on presubmits to make sure nothing breaks.

Bug: 307824623
Test: m com.android.apex.test.bar_stripped com.android.apex.test.baz_stripped com.android.apex.test.foo_stripped com.android.apex.test.pony_stripped com.android.apex.test.sharedlibs_generated com.android.apex.test.sharedlibs_secondary_generated with sandboxing enabled
Change-Id: I4006732bf1ba08e846dee2e18d89dbf45f2cd7ba
2023-11-02 18:08:20 -07:00
Spandan Das
3e75cfa795 Remove retrieveLegacyEncodedBootDexFiles
Seems to be an unused function

Test: TH
Change-Id: Ic0b352afc16ccaf450dadb5b13d9fb6c694e72e6
2023-11-03 00:46:29 +00:00
Jihoon Kang
3ea6467c1c Update checkapi error message to provide more guidance
With from-text stub feature, checkapi is also used for checking the
sanity of the stubs. Therefore, this change adds more explanatory
message about how the user can rebuild the target when their build
failed with stub validation after local API change.

Test: m nothing
Bug: 309027703
Change-Id: If7c9c287266f3da82edde663619b9f08ee05530d
2023-11-03 00:40:26 +00:00
Cole Faust
f45290a496 Remove UpdatableSystemFontTest modules from sandboxing denylist
These modules actually work fine with sandboxing, they were just added
to the list because they have non-deterministic outputs, which caused
the genrule sandboxing script to think that sandboxing affected their
outputs.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py UpdatableSystemFontTest_NotoColorEmojiV0.sig UpdatableSystemFontTest_NotoColorEmojiV0.ttf UpdatableSystemFontTest_NotoColorEmojiVPlus1.sig UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf UpdatableSystemFontTest_NotoColorEmojiVPlus2.sig UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf with aosp/2816385
Change-Id: I07b1df779c8d47ad875a4fc2d3af5e46945cff83
2023-11-02 17:15:23 -07:00
Jooyung Han
26464230a1 Merge changes from topic "unwanted-transitive-deps" into main
* changes:
  Enable dup check for test apexes
  Add apex.unwanted_transitive_deps property
2023-11-02 23:05:14 +00:00
Treehugger Robot
c012b631ae Merge "Optimize out empty path components" into main 2023-11-02 22:36:11 +00:00
Colin Cross
bf9ed3fba2 Optimize out empty path components
filepath.Join("foo", "") returns a newly allocated copy of "foo",
while filepath.Join("foo") does not.  Strip out any empty path
components before calling filepath.Join.

Test: TestValidatePath
Change-Id: Ib47dbcd9d6463809acfe260dfd9af87ea280b4de
2023-11-02 14:37:21 -07:00
Rico Wind
b56fe2825d Use R8 for resource shrinking
We are moving the resource shinking pipeline into r8 (gennerally, not just for platform)

This disables the usage of the resource shrinker cli from cmd-line tools

Bug: 308710394

Test: Existing, validated that resource table on SystemUI was byte<>byte equal.
Change-Id: Ia36b5e5970cbdcff519a5f05d672b44dc145ea32
2023-11-02 20:35:20 +01:00
Colin Cross
f96b001064 Don't call android.PathForModuleSrc(ctx).String() to get ModuleDir
ctx.ModuleDir is much cheaper than android.PathForModuleSrc(ctx).String().

Test: builds
Change-Id: I81819088d9564b06a0336a59a45f2b110b0bd9d6
2023-11-02 19:07:49 +00:00
Anas Sulaiman
4e6c3ef59b Merge "fix potential encoding issues in remote actions" into main 2023-11-02 18:21:57 +00:00
Treehugger Robot
717e7769ce Merge "Remove pre singletons" into main 2023-11-02 18:04:52 +00:00
Jihoon Kang
412dc7c488 Merge changes from topic "core-lambda-stubs-source" into main
* changes:
  Remove TxtStubLibraries.bp
  Move core.module_lib.stubs.from-text closer to source
2023-11-02 17:08:11 +00:00
Cole Faust
ae6cda6f10 Remove pre singletons
They're no longer used.

Test: m nothing --no-skip-soong-tests
Change-Id: I8984164cfc1a062c428ea7f1a4dd5b8940bee84b
2023-11-02 10:05:55 -07:00
Colin Cross
f2c51919ad Merge "Remove obsolete java version environment variables" into main 2023-11-02 17:05:06 +00:00
Jooyung Han
912a6f3501 Enable dup check for test apexes
Bug: 263308515
Test: m test_broken_com.android.art
Change-Id: I54aaba9424973f4d54c5a17f640cd79ac5dd28ec
2023-11-02 18:31:37 +09:00
Jooyung Han
a8bd72aec2 Add apex.unwanted_transitive_deps property
It can be used as a workaround when the current build system adds more
than necessary to APEX.

Bug: 263308515
Bug: 295593640
Test: m blueprint_tests
Change-Id: Ib59c4ac59e6128b3d112b97876e9e2d1e6ec4211
2023-11-02 18:31:37 +09:00
Treehugger Robot
87706098b0 Merge "Revert "Add support for PRODUCT_RELEASE_CONFIG_MAPS"" into main 2023-11-02 08:06:39 +00:00