Commit Graph

8274 Commits

Author SHA1 Message Date
Cole Faust
2c3fd767bb Merge "Add more specific partition visibility rules" into main am: e6ea0399a9 am: 5d71dc57a1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3006962

Change-Id: I404a731b9330be86b93a287e888b002c666ce1ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 22:20:31 +00:00
Cole Faust
e6ea0399a9 Merge "Add more specific partition visibility rules" into main 2024-03-20 21:50:26 +00:00
Spandan Das
a5e26d3cd6 Add an apex_contributions_defaults module to module sdk
This metadata module will contain a flattened list of all the soong
modules contributed by this module to the rest of the build. This is
supported in V and above.

Bug: 326246905
Test: m art-module-host-exports
Test: unzip -p out/soong/mainline-sdks/art-module-host-exports-current.zip Android.bp | grep -A 15 apex_contributions_defaults
apex_contributions_defaults {
    name: "art-module-host-exports.contributions",
    contents: [
        "prebuilt_art.module.api.annotations",
        "prebuilt_dex2oat",
        "prebuilt_dex2oatd",
        "prebuilt_dexdump",
        "prebuilt_hiddenapi",
        "prebuilt_oatdump",
        "prebuilt_profman",
        "prebuilt_veridex",
        "prebuilt_libartpalette",
        "prebuilt_libartbase",
    ],
}

Change-Id: Iba43a9da5430adfc0a5fd9b5dc27b5d89c5eacb8
2024-03-20 21:41:57 +00:00
Cole Faust
9a24d90936 Add more specific partition visibility rules
//visibility:any_system_partition, //visibility:any_vendor_partition,
etc.

Then, if a partition visibility rule is not specificed, but the module
is installed on a non-system partition via the `vendor: true` or other
properties, the visibility rule for that partition will be added by
default.

This is so that "any_partition" doesn't imply that modules could be put
on the vendor partition when they weren't designed for that, and so that
modules that do need to go on the vendor partition don't need to specify
both vendor: true and visibility:any_vendor_partition.

Eventually, the partition properties should be deprecated, and replaced
with just these visibility rules.

Bug: 321000103
Test: go tests
Change-Id: I24dba36bbc20921941f892480bf7c050e93827c6
2024-03-20 10:55:05 -07:00
Jiyong Park
8bcf3c64f1 Add required, host_required, and target_required as dependencies
So far, the installation of required modules were handled by Make. This
prevents us from implementing the module installation and packaging
entirely in Soong.

This CL is the first step towards that goal. Soong now correctly tracks
the dependencies and they are correctly returned by
TransitivePackagingSpecs(), which is used by packaging modules like
android_system_image.

Bug: 321626681
Test: build
Change-Id: I9192b5333ceaa0b7d1c5c4abeec2af62febcd976
2024-03-20 17:05:17 +09:00
Jihoon Kang
dc2dbaab5f Merge "Propagate intermediateCacheFiles in java modules and filegroup" into main am: 6e739b9b4d am: c46855cedb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3001320

Change-Id: Ied1675ac82cc37ad2ba058483d51fae3f9facd96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 00:59:46 +00:00
Jihoon Kang
6e739b9b4d Merge "Propagate intermediateCacheFiles in java modules and filegroup" into main 2024-03-20 00:08:50 +00:00
Spandan Das
364e22e431 Merge "Use RELEASE_DISABLE_VERIFY_OVERLAPS_CHECK to disable verify_overlaps" into main am: a8ad9bbd4f am: 74719a3405
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3006963

Change-Id: Ib3dde46b37ae43db5cb7cc480f05f45e62c5a8f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 23:55:52 +00:00
Spandan Das
07145109ff Use RELEASE_DISABLE_VERIFY_OVERLAPS_CHECK to disable verify_overlaps
This build flag will be used to disable the check when prebuilts are
used in internal main. For backwards compatibilty,
RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE can also be used to disable
this check.

Test: m nothing
Bug: 328200369
Change-Id: I710811995723e75bea9de1ce5c77504f66cbcf45
2024-03-19 21:32:19 +00:00
Jihoon Kang
705e63e362 Propagate intermediateCacheFiles in java modules and filegroup
This change propagates the intermediateCacheFiles generated by the
aconfig_declarations to the static rdeps that are java modules or the
rdeps that are filegroups.

Test: m nothing
Bug: 329284345
Change-Id: I02431336c1aa0378d03248f3bb6edf2f57ec3b7f
2024-03-19 20:54:05 +00:00
Jeongik Cha
51cdd8febd Merge "//visibility:any_partition can be used with another visibility field" into main am: 8b0192d031 am: 77b0861e96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2999577

Change-Id: I901a973754d8f7c06e7f6869e1dc9a0cee0b43df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 03:10:44 +00:00
Jeongik Cha
8b0192d031 Merge "//visibility:any_partition can be used with another visibility field" into main 2024-03-15 02:51:00 +00:00
Jeongik Cha
31be352612 //visibility:any_partition can be used with another visibility field
Bug: 321000103
Test: m nothing
Change-Id: I2f65ff4d51c65f974e2dc79c94dfefe180ddbfe4
2024-03-15 10:19:23 +09:00
Treehugger Robot
d314ae4f8a Merge "Make select statements work on path properties" into main am: f1ffd090e7 am: ae6525d828
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3001143

Change-Id: Ib3b4f406e4f8adc408c545f27cf69d44123babf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-15 00:31:03 +00:00
Treehugger Robot
f1ffd090e7 Merge "Make select statements work on path properties" into main 2024-03-14 23:52:24 +00:00
Treehugger Robot
aca8f49e54 Merge "Generate info about the selected app variant in platform builds" into main am: 4e4939665e am: b2c91edbba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3002986

Change-Id: I9fd1efc56101e9eabcfaf92b1ae159b1d7203e09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 22:40:54 +00:00
Cole Faust
bdd8aeeb58 Make select statements work on path properties
Fixes: 329711542
Test: go test
Change-Id: I71f489c26c535174e226e4a9ab449cc2b4bee83a
2024-03-14 15:24:09 -07:00
Treehugger Robot
4e4939665e Merge "Generate info about the selected app variant in platform builds" into main 2024-03-14 22:05:43 +00:00
Yu Liu
b524871548 Merge "Validate aconfig libs are built with the correct modes." into main am: f509eba41d am: b6f0bc02b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2989874

Change-Id: Ia0e31489f3d8cab59c9b18b9f5e875b03030947e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-14 19:30:48 +00:00
Yu Liu
f509eba41d Merge "Validate aconfig libs are built with the correct modes." into main 2024-03-14 18:39:12 +00:00
Spandan Das
3490dfd23f Generate info about the selected app variant in platform builds
This is a followup to aosp/2999198 and adds information about apps.

Each app will have an entry in this file with the following properties
- Name, mandatory
- Is_prebuilt, mandatory
- Prebuilt_info_file_path, optional

Implementation details
- Move prebuiltInfoProvider out of build/soong/apex to
  build/soong/android. This allows build/soong/java to use it.
- Introduce a new `prebuilt_info` prop to `android_app_set` and
  `android_app_import`
- All app module types will set a prebuiltInfoProvider in
  GenerateAndroidBuildActions, including the source app module types

Test: m nothing --no-skip-soong-tests
Test: m out/soong/prebuilt_info.json
Test: ls -l out/soong/prebuilt_info.json --human-readable
-rw------- 1 spandandas primarygroup 317K Mar 11 23:46 out/soong/prebuilt_info.json

Test: #modified trunk_staging.locally to select prebuilts of some
mainline apps. Spot-checked that `is_prebuilt` and
`prebuilt_info_file_path` get populated appropriately

Bug: 327480225
Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
2024-03-14 18:12:30 +00:00
Treehugger Robot
7a09abcc88 Merge "Add defaults support for apex_contributions module type" into main am: 66e8a75700 am: a00644e2ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2990552

Change-Id: I59148f2e063aa1c89049dbe46f8ffde051130248
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-12 21:58:15 +00:00
Treehugger Robot
66e8a75700 Merge "Add defaults support for apex_contributions module type" into main 2024-03-12 20:35:12 +00:00
Treehugger Robot
182a9a6e24 Merge "Allow PrevVendorApiLevel to be less than 34" into main am: b952c84841 am: 36741000cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2988349

Change-Id: I191fdfce4c546bef900d642f25ebe5cc72802866
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-11 06:25:54 +00:00
Treehugger Robot
b952c84841 Merge "Allow PrevVendorApiLevel to be less than 34" into main 2024-03-11 04:56:59 +00:00
Treehugger Robot
444e613512 Merge "Remove starlark_import" into main am: 385138a836 am: eef7c5c2f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2994758

Change-Id: I4f090e91c95a94c257943b9a9f4a6acb8584db19
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 19:40:42 +00:00
Cole Faust
68a8cfb14b Merge "Replace starlark_import with hardcoded map" into main am: fb8356c4c0 am: 58a88793da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2991105

Change-Id: I774b729b920a80cd0611d4da751394be88c1675f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-07 19:16:22 +00:00
Cole Faust
c6fd53246b Merge "Select statements" into main am: 140180dd5b am: fc0e574bdf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2962126

Change-Id: I857d9b60001d72716af653e48c833536947a64c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-07 19:15:55 +00:00
Cole Faust
256cfbee24 Remove starlark_import
This is no longer used since the roboleaf cancellation.

Bug: 315353489
Test: m nothing --no-skip-soong-tests
Change-Id: Ie6ee093c2810498306ea4a2288050eed17a35357
2024-03-07 10:53:41 -08:00
Yu Liu
67a28425a7 Validate aconfig libs are built with the correct modes.
Bug: 323071835
Test: Unit tests and manual tests.
Change-Id: I32de90826c7c8bb4d8495608e959d554820ab9a2
2024-03-07 18:51:16 +00:00
Cole Faust
fb8356c4c0 Merge "Replace starlark_import with hardcoded map" into main 2024-03-07 17:39:35 +00:00
Cole Faust
140180dd5b Merge "Select statements" into main 2024-03-07 17:39:27 +00:00
Cole Faust
5a231bd819 Select statements
See the blueprint cl for more information.

Things still to do:
 - Support selecting on product variables and
   variants
 - Test/Support property struct reflection tags
   like arch_variant, path, and variant_prepend
 - Test that selects combine well with existing
   configurability mechanisms like arch:, target:,
   multilib:, python's version:, etc.

Bug: 323382414
Test: go tests
Change-Id: If5d1ea1ad0c4ebabffaea91d62e1a1c6f926a793
2024-03-06 16:03:01 -08:00
Cole Faust
37bfb07722 Replace starlark_import with hardcoded map
With roboleaf being cancelled, we don't need the api levels to be
present in starlark.

Bug: 315353489
Test: Presubmits
Change-Id: I21ea61ced00a5b0ae066a9ca99a88a512bf115ac
2024-03-06 15:59:18 -08:00
Spandan Das
471d068893 Add defaults support for apex_contributions module type
Bug: 326246905
Test: go build ./android

Change-Id: I8be21594465d81c99c216b0fcbf9996aed46c209
2024-03-06 17:41:04 +00:00
Hsin-Yi Chen
890e7722e7 Allow PrevVendorApiLevel to be less than 34
Some developers need to set VendorApiLevel to 34. Though the
configuration is not officially supported, the ABI checker supports it
on a best-effort basis.

Test: make
Bug: 320347314
Change-Id: Ic3f5ea2028329f5d04606760b07947b7c98b2e51
2024-03-05 15:56:44 +08:00
Spandan Das
558c8dc219 Support partial module variants with apex_contributions am: 972917d794 am: cbebb3437d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978138

Change-Id: I3b328671143a2e73202614d458a533fa6a4e056d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:50:36 +00:00
Spandan Das
2391caf42d Fix non-determinism in prebuilt selection am: f2c1057586 am: d1816e09f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984036

Change-Id: I6062c3ccd1e864bd2d5cd7790957db99b6a76f63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:49:39 +00:00
Spandan Das
cbebb3437d Support partial module variants with apex_contributions am: 972917d794
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2978138

Change-Id: Ifc2ffd8b9cccf2151fd11e2111afb00912f91746
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:28:28 +00:00
Spandan Das
d1816e09f0 Fix non-determinism in prebuilt selection am: f2c1057586
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984036

Change-Id: Id4f52ec49aad78751373840c6e1dc252990db0f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-04 10:07:19 +00:00
Spandan Das
972917d794 Support partial module variants with apex_contributions
Some libraries like `libnativehelper_compat_libc++` only exist as shared
library in module sdk. When prebuilt of this library is selected using
apex_contritbutions, only shared linkages should be redirected to the
prebuilt version. The static linkage should come from source.

Test: Added a unit test
Bug: 322175508

Change-Id: Ic65d376b2354b4a42c7b9ea3ed1cd80c37e2840f
2024-03-04 08:39:20 +00:00
Spandan Das
f2c1057586 Fix non-determinism in prebuilt selection
This relands aosp/2978137 with acknowledgement of soong namespaces.

If multiple versions of the prebuilt module sdk share the same soong
config namespace, then PrebuiltPostDepsMutator rewrites rdeps to one of
those prebuilts in a non-deterministic way.

This CL uses apex_contributions to make this deterministic. Multiple
prebuilts will not be allowed to have their prefer evaluate to true. If
this happens, one of the prebuilts must be explicitly declared in
apex_contributions.

This CL also fixes the special-casing of the top-level
java_sdk_library_import in ReplaceDirectDependencies. For
framework-foo.v2, it will use BaseModuleName framework-foo instead of
SdkLibraryName framework-foo.v2 to determine if the source module has
been selected.

Test: ran the previously failing cmd of b/327552112
Test: Added a unit test
Test: aninja -t query
    out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
    | grep module_sdk is empty (should not cause a regression for
    323454855)
Change-Id: Id484a41192085c50b7e34ad415c6e195edb0d006
2024-03-04 07:59:34 +00:00
Treehugger Robot
e169c59ed0 Merge "Add the build flags for apex contribution contents" into main am: e9f270a61f am: 308388d2fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982634

Change-Id: I5569873027318d2714e485705884025584cc3d22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-01 01:16:53 +00:00
Treehugger Robot
308388d2fa Merge "Add the build flags for apex contribution contents" into main am: e9f270a61f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982634

Change-Id: I26305a22b59823db84b225850be812e4249110a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-01 00:13:48 +00:00
Treehugger Robot
e9f270a61f Merge "Add the build flags for apex contribution contents" into main 2024-02-29 23:34:15 +00:00
Treehugger Robot
5cb6758f83 Merge "Remove --multitree-build" into main am: 7c8cf91ff8 am: 33f110f428
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982507

Change-Id: I735d657ce9e3f564fb1e6befd4c7043d4707d797
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 21:43:25 +00:00
Treehugger Robot
33f110f428 Merge "Remove --multitree-build" into main am: 7c8cf91ff8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2982507

Change-Id: I86c17fc27621ce32ebf555ba4c2222b1ad4c0dec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 20:57:56 +00:00
Spandan Das
341f6c7223 Merge "Revert "Fix non-determinism in prebuilt selection"" into main am: 5354483c12 am: 1e9810748e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984372

Change-Id: Ied7c0c39b23d6187523b31a92c0851c43349149a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:27:48 +00:00
Spandan Das
1e9810748e Merge "Revert "Fix non-determinism in prebuilt selection"" into main am: 5354483c12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2984372

Change-Id: I5c759faa655a3fa81f68ffbdb42dfb70ea4d22e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 18:05:11 +00:00
Devin Moore
4bb96625ba Merge "Let Release_aidl_use_unfrozen add vintf_fragments" into main 2024-02-29 17:14:40 +00:00