Commit Graph

81513 Commits

Author SHA1 Message Date
Treehugger Robot
87177f21b4 Merge "Fix non-determinism in all_teams.pb" into main 2024-02-05 23:29:14 +00:00
Colin Cross
6c392749d5 Merge changes Ied8fd7b5,Ib0584545 into main
* changes:
  Remove fdoProfileMutator
  Convert AFDO mutators to TransitionMutator
2024-02-05 23:03:49 +00:00
Joe Onorato
349ae8dd6b Automatically propagate jarjar rules for aconfig libraries
Test: treehugger
Bug: 310504781
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:97c03a6dc659102ff40793759fb3f0f18164a85b)
Merged-In: I639d12ff33175b7bed7e7d0595a40dd9b0d99367
Change-Id: I639d12ff33175b7bed7e7d0595a40dd9b0d99367
2024-02-05 22:46:00 +00:00
Spandan Das
2268cd8b8b Fix non-determinism in all_teams.pb
this.teams_for_mods uses a dictionary and `range` yields a
non-deterministic ordering. This would cause all_teams.pb to be
non-determinisitic. Since this file is created during Soong analysis, it
would cause the .ninja file to also be non-deterministic.

Use SortedKeys to do the iteration instead.

Test: go build ./android
Test: m nothing a couple of times and checked that the .ninja files are
identical

Change-Id: Ife2d2520d118ef25639f86390912d98b5f057655
2024-02-05 22:11:28 +00:00
Spandan Das
a27655f5f8 Merge "Sort the inputs to mergedAconfigFilesRule" into main am: bb0d5866c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2951486

Change-Id: Idc0672a97f069a3fa673db9ff5b64a01cc8e5b7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 21:23:50 +00:00
Colin Cross
0f01d9efff Merge "Follow signature update to ExtendMatchingProperties" into main am: 6b2b493bf3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2947429

Change-Id: I52228441e1ab61c0a1e3f577c9479aa51c226551
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 21:23:33 +00:00
Spandan Das
bb0d5866c5 Merge "Sort the inputs to mergedAconfigFilesRule" into main 2024-02-05 21:16:54 +00:00
Colin Cross
6b2b493bf3 Merge "Follow signature update to ExtendMatchingProperties" into main 2024-02-05 21:02:02 +00:00
Colin Cross
9f56d98f9a Merge changes I64a5f3c9,I1ed0a380 into main am: 2a28cd3c5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2947428

Change-Id: I214abe70d6f4d312a490a93cab1cdbe570b37d0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 21:01:01 +00:00
Colin Cross
2a28cd3c5e Merge changes I64a5f3c9,I1ed0a380 into main
* changes:
  Optimize mutator contexts
  Optimize InstallPath.String()
2024-02-05 20:22:20 +00:00
Spandan Das
4d4edfb8d8 Sort the inputs to mergedAconfigFilesRule
The aconfig files are collected by visiting the direct deps of the
module. VisitDirectDeps does not guarantee ordered traversal. To prevent
non-determinism in the generated ninja file, sort the inputs.

Test: go build ./android
Change-Id: Ic67fc0859bf18de62b6297ed502d1d495cc3a780
2024-02-05 19:34:48 +00:00
Spandan Das
7f606c16ef Merge "Do not replace the direct edge between rdeps and java_sdk_library" into main am: b01db714e3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2944724

Change-Id: Idba2adcc019825991b35da9c5da6b7b7556cba4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 18:51:26 +00:00
Spandan Das
b01db714e3 Merge "Do not replace the direct edge between rdeps and java_sdk_library" into main 2024-02-05 17:04:55 +00:00
Rico Wind
9e367ed91a Merge "Revert "Integrate Rust-specific System Properties into rules generation."" into main am: 444d6b68ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2950685

Change-Id: I1639ce4885cb768a63c49ab6e3efba955eeaedb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 15:23:55 +00:00
Kousik Kumar
0ecb73a5cc Merge "Allowlist gcloud to be run during the build" into main am: 3f1c98978b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2944125

Change-Id: Iebb7ad505e291d013a57c96bce9869c851c1fb65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 15:23:29 +00:00
Rico Wind
444d6b68ae Merge "Revert "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-05 14:41:56 +00:00
Kousik Kumar
3f1c98978b Merge "Allowlist gcloud to be run during the build" into main 2024-02-05 14:31:35 +00:00
Rico Wind
be3ea4f149 Revert "Integrate Rust-specific System Properties into rules generation."
This reverts commit 65374edd0e.

Reason for revert: b/323833345

Change-Id: Ia722b68923617b4abfe3fd96b54b3fe108e9de74
2024-02-05 14:02:56 +00:00
Andrew Walbran
87c3ccb3ee Merge "Integrate Rust-specific System Properties into rules generation." into main am: 4b8e361b4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2683106

Change-Id: I0188a68d1a9ae93ee369821385fc6b53d0860fb7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 11:28:19 +00:00
Andrew Walbran
4b8e361b4c Merge "Integrate Rust-specific System Properties into rules generation." into main 2024-02-05 10:50:59 +00:00
Kiyoung Kim
84b6508604 Reapply "Rename LOCAL_USE_VNDK"
Similar with aosp/2897612, rename LOCAL_USE_VNDK into
LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT to make variable useful from
VNDK deprecation.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: If7bead24add014ed9e0e9e1d265b0199b911be89
2024-02-05 10:31:23 +09:00
Joe Onorato
d2db61013d Add new soongdbg command and a big json file full of soong debugging info. am: e5ed34746e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2949366

Change-Id: Ie98f012db196e622aa5e2ddb0281a7d6900e489d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 00:51:59 +00:00
Joe Onorato
e5ed34746e Add new soongdbg command and a big json file full of soong debugging info.
In order to use soongdbg, you must run analysis with GENERATE_SOONG_DEBUG=true set
in the environment.

Test: GENERATE_SOONG_DEBUG=true m nothing ; soongdbg ...
Change-Id: If43676fe2784f05cd87c0ecb4a46ab676b91023f
2024-02-03 14:44:11 -08:00
Aditya Kumar
7c98cfa93f Merge "Revert^2 "Update clang version to clang-r510928"" into main am: b2a56627a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2944572

Change-Id: I48b72917aebe0810d34cb375f125807099de8437
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-03 13:31:22 +00:00
Aditya Kumar
b2a56627a2 Merge "Revert^2 "Update clang version to clang-r510928"" into main 2024-02-03 12:54:13 +00:00
Treehugger Robot
4725b30d55 Merge "Reduce warning spam from "unused-" flags in //external, //vendor, //hardware" into main am: fe423e39fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923732

Change-Id: If361d171dc8aae8d7eaf06baf77c2de77e7e6160
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-03 04:04:01 +00:00
Treehugger Robot
fe423e39fb Merge "Reduce warning spam from "unused-" flags in //external, //vendor, //hardware" into main 2024-02-03 03:25:58 +00:00
Spandan Das
81d95c5824 Do not replace the direct edge between rdeps and java_sdk_library
android/prebuilt.go#isSelected has a special-case inside it to ignore
apex_contributions contents for the top-level java_sdk_library hook.
This was necessary because even though we might want source stubs in
next builds, we still needed the top-level prebuilt hook to be active to
emit the dexpreopt rules to .mk.

This worked fine for rdeps that create a dependency edge on the child
stub modules of java_sdk_library. Notable examples include the full
android api stubs created by f/b/api.go. In postdeps mutator, these
expanded deps get rewritten to source/prebuilt if necesssry.

The exception to this are workflows which depend on the top-level hook
directly via `libs`. We resolve these rdeps to an appropriate provider
during GenerateAndroidBuildActions stage. This meant that rdeps were
getting prebuilt stubs of these even in next builds.

Bug: 323454855

Test: Added a unit test

Test: lunch cf_x86_64_only_phone-next-userdebug
Test: aninja -t query
out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
| grep prebilts/module_sdk # empty now

Change-Id: Id91333d88055519f3c58ab40466f9628085f5180
2024-02-03 00:17:16 +00:00
Colin Cross
1e7e0432fa Follow signature update to ExtendMatchingProperties
The order function passed to ExtendMatchingProperites no longer takes
a property, dstValue or srcValue parameter.

Test: builds
Change-Id: I19fc554f705fbf42100f0a38df87e2d1fb2454ec
2024-02-02 15:56:32 -08:00
Colin Cross
984223fd04 Optimize mutator contexts
Mutator contexts are created for every module, and in the case of
transition mutator contexts for every dependency of every module.
Unlike the Blueprint mutator contexts that they wrap, the Soong
mutator contexts can be relatively large.  Add global pools for all
of them that can avoid the repeated allocations.

Test: SOONG_PROFILE_MEM=/tmp/mem.pprof m nothing
Change-Id: I64a5f3c91292cff6352300f99c11ac50c713f96d
2024-02-02 15:56:32 -08:00
Colin Cross
c0e42d5dfc Optimize InstallPath.String()
Every InstallPath will have String() called on it eventually, often
more than once if it is in a slice that is sorted.  Precompute the
full path so it can be returned from InstallPath.String() without
recomputing every time.

Test: paths_test.go
Change-Id: I1ed0a3801806854356865c0a5fc35d5cf6d349fe
2024-02-02 15:56:32 -08:00
Aditya Kumar
ef7c121a6b Revert^2 "Update clang version to clang-r510928"
22686bab04

Change-Id: I1117546bb71548e1146c6ae43419b6aef772f812
2024-02-02 14:32:47 -08:00
Jihoon Kang
094cc9a9aa Merge "Modify LOCAL_DROIDDOC_* to export the exportable artifacts" into main am: 7dacb0e872
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2944801

Change-Id: I34ae89dd0a07180db9ad776a71b2711d0e4523f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 20:38:00 +00:00
Jihoon Kang
7dacb0e872 Merge "Modify LOCAL_DROIDDOC_* to export the exportable artifacts" into main 2024-02-02 19:51:14 +00:00
Jihoon Kang
246690a400 Modify LOCAL_DROIDDOC_* to export the exportable artifacts
LOCAL_DROIDDOC_STUBS_SRCJAR is used to copy entries to OUT_DOCS in
build/make/core/soong_droiddoc_prebuilt.mk, which defines the copy rules
to generate the docs. When generating the documentation, the exportable
stubs should be set as dependencies, so that disabled flagged apis are
not exposed. Thus, this change modifies the entries passed to
LOCAL_DROIDDOC_STUBS_SRCJAR from the everything stubs to the exportable
stubs.

Likewise, all other LOCAL_DROIDDOC_* entries are copied to dist during
sdk builds. Therefore, this change replaces the everything artifacts to
the exportable artifacts.

This change also config-guards the exportable stubs generation, so that
the exportable stubs are not generated when the droidstubs module does
not generate the stubs.

Test: m docs dist && inspect ninja file to verify that everything stubs are not exported
Bug: 323261972
Change-Id: Ic04fb47ad311aefafc2f1a7b8bb15525050ecd2e
2024-02-02 18:21:27 +00:00
Treehugger Robot
11f4edf384 Merge "Revert "Rename LOCAL_USE_VNDK"" into main am: 0e5f6e4e9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2946127

Change-Id: Id3c15a2729192a3ff5ed9e55235a6470c19f2fa3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 11:19:41 +00:00
Treehugger Robot
0e5f6e4e9f Merge "Revert "Rename LOCAL_USE_VNDK"" into main 2024-02-02 10:38:49 +00:00
Kiyoung Kim
ed63c02e9b Revert "Rename LOCAL_USE_VNDK"
Revert submission 2931430-local_use_vndk

Reason for revert: build fails with barbet targets

Reverted changes: /q/submissionid:2931430-local_use_vndk

Change-Id: Ic5b850e2905d1b93e8b4d08921106940991587b8
2024-02-02 08:06:52 +00:00
Aditya Kumar
0dd6a2c0a3 Merge "Remove x86 specific flags from bpf target" into main am: 14b5f6e05b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2940160

Change-Id: I4121d695a8a861084044ec8ca58156d8dcf210f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 06:40:38 +00:00
Aditya Kumar
14b5f6e05b Merge "Remove x86 specific flags from bpf target" into main 2024-02-02 06:05:20 +00:00
Hsin-Yi Chen
35ecf23c13 Merge "Separate LLNDK from the platform library dumps" into main am: c9d4eab9fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2939639

Change-Id: I85a6f00507af41235645aeb13244aed0dde6525f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 05:13:40 +00:00
AdityaK
6cfd07e524 Remove x86 specific flags from bpf target
Test: cd external/bcc/libbpf-tools && mm

Bug: b/308826679

Change-Id: Ibb76832c4013360b6561a6d3676f35adc9ecde5f

Change-Id: Ibb76832c4013360b6561a6d3676f35adc9ecde5f
2024-02-01 20:51:48 -08:00
Hsin-Yi Chen
c9d4eab9fe Merge "Separate LLNDK from the platform library dumps" into main 2024-02-02 04:34:50 +00:00
Treehugger Robot
caf3676945 Merge "Determine GC type based on BUILT_KERNEL_VERSION_FILE." into main am: d8cb9505f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2919746

Change-Id: I8f5460e206ecfb91af61346b7e2a15f78fced4fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 03:26:26 +00:00
Treehugger Robot
38b8b3fe9e Merge "Rename LOCAL_USE_VNDK" into main am: 838b29ebc7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2931410

Change-Id: I0030054ed1bee4acc559bc0959aaeb9f1692912d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 03:26:06 +00:00
Jihoon Kang
f10ad16f31 Merge "Fix api versions xml file handling in droidstubs" into main am: c240996829
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929610

Change-Id: I336764a515a61ac7565e85760bfb56d7c2253824
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 03:25:45 +00:00
Treehugger Robot
d8cb9505f8 Merge "Determine GC type based on BUILT_KERNEL_VERSION_FILE." into main 2024-02-02 03:01:57 +00:00
Treehugger Robot
838b29ebc7 Merge "Rename LOCAL_USE_VNDK" into main 2024-02-02 02:48:35 +00:00
Jihoon Kang
c240996829 Merge "Fix api versions xml file handling in droidstubs" into main 2024-02-02 02:31:17 +00:00
Treehugger Robot
4db5f221cc Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into main am: b370adbdcc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2938002

Change-Id: If5ff548de032bbbda511c344d7aefc4fa3bb682c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 01:57:56 +00:00