Commit Graph

1414 Commits

Author SHA1 Message Date
Treehugger Robot
f325babc6d Merge changes Ifbe123d1,Ie2e738a6 into main am: 8298134503 am: 665ece7963
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3083813

Change-Id: I849464d86f7b07e661bc4106e3dc2e77eebdeddd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-20 18:17:39 +00:00
Spandan Das
50801e20a3 Support min_sdk_version overrides in apexes
The use case for this are go apexes which are only installed in T and
above, even though the base AOSP apexes might be installable on < T
devices.

If provided, the overridden min_sdk_version will be
1. Used as the `min_sdk_version` in the manifest file of the
   top-level override apex binary
2. Used to build the transitive closure of its dependency with that
   min_sdk_version, i.e. with a different apex variant.

(2) requires some special handling. At ToT, the outgoing transition
value is the base apex name (e.g. com.android.foo). Since
min_sdk_version of the overridding apex can be different than the
overridden apex, the base apex name is no longer sufficient. Instead,
transition to the name of the overriding apex com.mycompany.android.foo.
If deduping is possible, transitive deps will get deduped to
`apex_<min_sdk_version>` later.

Test: added a unit test
Test: in internal, modified min_sdk_version of com.google.android.go.art
locally, built BA and Go apexes, and used `aapt2 dump badging` to verify
that BA has minSdkVersion of 31 and Go has minSdkVersion of 33

Bug: 295311875

Change-Id: Ifbe123d1517fccbc0c058042b8a6eeb3609b6787
2024-05-20 16:24:52 +00:00
Ivan Lozano
fc7f829326 Merge changes from topic "rust-made-to-order-staticlibs" into main am: e8fcd37775 am: 5345113a86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3080891

Change-Id: I76932b282119b0c63b0457ea7ed5ff839daf253a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 13:28:51 +00:00
Ivan Lozano
e8fcd37775 Merge changes from topic "rust-made-to-order-staticlibs" into main
* changes:
  rust: made-to-order rust staticlibs
  rust: refactored transformSrctoCrate
2024-05-17 12:40:36 +00:00
Ivan Lozano
0a468a4f3b rust: made-to-order rust staticlibs
Whenever any two Rust static libraries are included
as static libraries anywhere in a CC dependency tree, we sometimes
get duplicate symbol errors. To avoid this, we no longer
directly link multiple rust static libs to CC modules.

Instead, we build rust_ffi_rlib modules and produce the actual
static library that gets linked against the CC module based on
that CC module's full list of Rust rlib dependencies.

This introduces a new static_rlibs property for cc modules to
define the rust_ffi_rlib dependencies, which are then used to
generate the module above.

This CL is intended to deprecate rust_ffi_static. It leaves
rust_ffi_static and rust_ffi static variants in place until
the remaining rust_ffi_static declarations and uses can be
removed. In the meantime, rust_ffi_static produces
rust_ffi_rlib variants as well to make the transition easier.

Bug: 254469782
Test: m # with no changes
Test: m libapexsupport # with static_rlibs
Test: m libunwindstack # with static_rlibs
Test: m netsimd # with static_rlibs, no duplicate symbols
Test: m blueprint_tests # New Soong tests

Change-Id: I47e27ac967ef0cad46d398ebf59d8275929ae28a
2024-05-16 13:00:43 -04:00
Cole Faust
369bad573f Merge "Qualify prebuilt_etc apex module name by relative paths" into main am: 277e444cb3 am: aae86c8947
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3086647

Change-Id: Id200b319f28ffd3521b939f33c04092e50f7c28c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-15 21:51:58 +00:00
Cole Faust
2c6dc3ab5d Merge "Revert "Qualify prebuilt_etc apex module name by relative paths"" into main am: 3ef813bdf2 am: 0ed7bfecfc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3089006

Change-Id: I3a455b0e13da01f0d72e1d47ea6014100fb6ea66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-15 18:27:10 +00:00
Cole Faust
7c991b4e33 Qualify prebuilt_etc apex module name by relative paths
Currently, you can't have two prebuilt_etcs in one apex with the same
file name, because apexes emit make modules for all the files in the
apex, and the module name for the prebuilt_etc's make representation
is based on the base filename of the installed file. We can change it to
be qualified based on the full relative path of the outputfile so that
you don't hit the conflicts as much.

Fixes: 340207931
Test: Presubmits
Change-Id: I7836fd4661fcaafd91901eba7e0b89506946c3e2
2024-05-15 11:17:55 -07:00
Cole Faust
c005ba0fa2 Revert "Qualify prebuilt_etc apex module name by relative paths"
This reverts commit d94cccc523.

Reason for revert: Patchset 2 was wrong, doesn't actually fix the bug

Change-Id: Ie2d931ad3e2277ce1923284b13f50f62ac2f8917
2024-05-15 18:01:43 +00:00
Cole Faust
848dae1986 Merge "Qualify prebuilt_etc apex module name by relative paths" into main am: e0943e95f4 am: f335a110cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3086166

Change-Id: Id9ce3c6c87bc37f7b8f947366229ff2eb91abc60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-15 17:47:32 +00:00
Cole Faust
d94cccc523 Qualify prebuilt_etc apex module name by relative paths
Currently, you can't have two prebuilt_etcs in one apex with the same
file name, because apexes emit make modules for all the files in the
apex, and the module name for the prebuilt_etc's make representation
is based on the base filename of the installed file. We can change it to
be qualified based on the full relative path of the outputfile so that
you don't hit the conflicts as much.

Bug: 340207931
Test: Presubmits
Change-Id: I6708d89c755c31c17cce112fb08a810e51926c76
2024-05-14 14:42:22 -07:00
Justin Yun
2448ce6385 Remove duplicated CollectDependencyAconfigFiles() am: 40182b6ff3 am: 6928bcfa4a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3074027

Change-Id: I03e902b51aa19cb89b651cc580ccebf27a705707
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-10 07:16:35 +00:00
Justin Yun
40182b6ff3 Remove duplicated CollectDependencyAconfigFiles()
android.ModuleBase already calls aconfigUpdateAndroidBuildActions()
that is the same with CollectDependencyAconfigFiles(). Remove the
CollectDependencyAconfigFiles() to avoid duplication with
aconfigUpdateAndroidBuildActions().

To make the aconfig information available in
GenerateAndroidBuildActions() of all modules, call
aconfigUpdateAndroidBuildActions() before calling
GenerateAndroidBuildActions() of each module.

Also, we don't need SetAconfigFileMkEntries(), which is a duplicate
of aconfigUpdateAndroidMkData()

Bug: 335363964
Test: diff `adb shell printflags` before and after the change.
Change-Id: I52808e442e9fed7db1eae7b7c5ed0b1c5ba74f5d
2024-05-10 10:00:14 +09:00
Treehugger Robot
1ee43f66ef Merge "Revert^2 "Remove compilation actions from java sdk library"" into main am: 7eaf503cfd am: b2923453b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3079425

Change-Id: I0b7ae717b6af9df90420ec87acaf20932cdc7fb7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-08 23:10:55 +00:00
Treehugger Robot
7eaf503cfd Merge "Revert^2 "Remove compilation actions from java sdk library"" into main 2024-05-08 22:28:05 +00:00
Jihoon Kang
a3a05460b4 Revert^2 "Remove compilation actions from java sdk library"
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.

This change relands https://r.android.com/3035972. Implementation
changes from the original change:
- "all_apex_contributions" is added as a dependecy to the implementation
  library modules where the parent sdk_library module has a prebuilt
  equivalent. This allows the source apex variant to be hidden from make
  when the prebuilt is active.

Test: patch in internal main, lunch barbet-ap2a-userdebug && m nothing
Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I017938e5567aef82e428e7ceb557d9c9090e0257
2024-05-08 17:46:31 +00:00
Jihoon Kang
4a309b5eac Merge "Revert "Remove compilation actions from java sdk library"" into main am: 5284ad3b33 am: 87296e35d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3074636

Change-Id: I96f97fef6e4dd7dd43ec3c1f65a29541c748a84c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 01:02:28 +00:00
Jihoon Kang
87296e35d3 Merge "Revert "Remove compilation actions from java sdk library"" into main am: 5284ad3b33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3074636

Change-Id: If4a161286b3f03bcbdc1f387487fba72701787ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 00:24:51 +00:00
Jihoon Kang
5284ad3b33 Merge "Revert "Remove compilation actions from java sdk library"" into main 2024-05-07 00:03:05 +00:00
Jihoon Kang
8f25d296b5 Revert "Remove compilation actions from java sdk library"
Revert submission 3070882-sdk_lib_remove_compilation

Reason for revert: Potential culprit for build breakage of barbet-ap2a-userdebug in git_main

Reverted changes: /q/submissionid:3070882-sdk_lib_remove_compilation

Change-Id: I5135760e13e0152480c68fe91a3c88564e9bc7cb
2024-05-06 22:40:22 +00:00
Treehugger Robot
a4b92f490d Merge "Remove compilation actions from java sdk library" into main am: f91daab1ab am: e5011d8f23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3035972

Change-Id: I88d9dd8c3dabea01588455c92d8a734e93206e2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 21:39:08 +00:00
Treehugger Robot
e5011d8f23 Merge "Remove compilation actions from java sdk library" into main am: f91daab1ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3035972

Change-Id: I2df9d4940eb12bb8d8cb46d05bfef05d2666ae8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 21:24:03 +00:00
Treehugger Robot
f91daab1ab Merge "Remove compilation actions from java sdk library" into main 2024-05-06 21:06:54 +00:00
Jihoon Kang
d831af4267 Remove compilation actions from java sdk library
This change modifies the build actions of java_sdk_library module type
so that it does not perform any compilation actions (i.e. does not
create the top level java_sdk_library jar file). Instead, it delegates
the build actions the top level jar file was performing to the
dynamically created ".impl"-suffixed java library module. The build
actions that are delegated to the impl library module include hiddenapi
processing, dexing, and dexpreopt.

Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: I7534f9eaacf6d9f72fbf8d540b1e26af84106c20
2024-05-03 20:51:11 +00:00
Cole Faust
a963b94cde Make the enabled property configurable
This allows using select statements with it.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-02 15:41:24 -07:00
Cole Faust
850469195e Merge "Reapply "Make the enabled property configurable"" into aosp-main-future am: 6c87a53771
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27185858

Change-Id: I3d2aebc83b476195888476364ce9b15325e6d84c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 21:16:39 +00:00
Cole Faust
021bf3d973 Reapply "Make the enabled property configurable"
Previously, I had changed some loadhook-appended property structs
to use selects instead of the "target" property struct. This seems
to not be exactly equivalent because "target" properties are merged
with the regular properties later, at the time the arch mutator runs.

With this reapplication, leave those target property structs alone
to avoid breakages, but I'll have to look into what the issue is
with them later.

This reverts commit ed5276f082.

Ignore-AOSP-First: This cl needs to be in a topic with internal-only projects, will cherrypick to aosp after.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-02 10:56:36 -07:00
Priyanka Advani
9b8e42e2f4 Merge "Revert "Make the enabled property configurable"" into aosp-main-future am: c4466a6387
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27180893

Change-Id: I1d88f9b7033829eeabaaf11deca41c8b41acf0ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 23:21:48 +00:00
Priyanka Advani
ed5276f082 Revert "Make the enabled property configurable"
Revert submission 27162921-configurable_enabled_property

Reason for revert: Droid-monitor created revert due to Build breakage in b/338253720. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:27162921-configurable_enabled_property

Change-Id: I2d144f9d297373a13a1190b173d10c966181ad84
2024-05-01 20:02:41 +00:00
Cole Faust
21d8e4068e Merge "Make the enabled property configurable" into aosp-main-future am: 1256e6f47a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/27162921

Change-Id: Ia3e905622c7e9fcf95fbb8c76a8144cbf2324529
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 19:46:24 +00:00
Cole Faust
0e0d749062 Make the enabled property configurable
This allows using select statements with it.

Ignore-AOSP-First: This needs to be in a topic with changes in interal-only repositories, I'll cherrypick to aosp after.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
2024-04-30 10:56:12 -07:00
Colin Cross
19cdb7acf0 Merge "Convert apex mutator to a TransitionMutator" into main am: 757e88a9df am: c955bda138
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3042819

Change-Id: I6a986963f5e18b21668670fe600302d2d6af9447
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 19:25:22 +00:00
Colin Cross
7c035064db Convert apex mutator to a TransitionMutator
Replace the apex mutator with a TransitionMutator.  Requires moving the
base.apexInfo value into a provider so that it is still present for the
Mutate pass.

Test: go test ./...
Test: no change to out/soong/build-${TARGET_PRODUCT}.ninja
Change-Id: I1c898eaf30b4021f0f96f439cc0b3b3173710fc7
2024-04-18 15:08:43 -07:00
Jiyong Park
6b6292cd1f Merge "APEX can depend on non-APEX module and vice versa" into main am: 39011ef40c am: d300e50dec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3029143

Change-Id: I28da518815db68fef1512e783b944ab1000817c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 23:38:41 +00:00
Jiyong Park
39011ef40c Merge "APEX can depend on non-APEX module and vice versa" into main 2024-04-08 22:28:26 +00:00
Treehugger Robot
8418f7c60a Merge "Remove Device VNDK version usage from Soong" into main am: ed2adb879f am: 8a57bcba2f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3027063

Change-Id: Iee85ae97d1d4337aec6589f5adb30f23e6adc153
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 20:08:28 +00:00
Jiyong Park
fc095e6796 APEX can depend on non-APEX module and vice versa
Previously, an APEX module (also called apexBundle inside of Soong) had
only one "apex" variant which has the same name as the module. This
prevented an APEX from depending on another module which is outside of
the APEX (ex: another APEX). Similarily, a module outside of an APEX
(ex: a shared lib or a test) couldn't depend on an APEX.

This CL fixes the issue by creating the "" variant as the alias of the
"<apex_name>" variant, and also by setting the "" variant as the default
dependency variant.

Bug: 321626681
Test: m
Change-Id: Ie3e57a96530c25e966cfd551676d819c442bb0d5
2024-04-05 14:39:23 +09:00
Kiyoung Kim
4e765b1bfc Remove Device VNDK version usage from Soong
As of VNDK deprecation, Device VNDK version should no longer be used
from build. This change removes all references on Device VNDK version
and related logic with it.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ibc290f0b41e8321f80c75c69f810223989af68dc
2024-04-05 01:57:32 +00:00
Kiyoung Kim
2f4aef599a Merge "Remove PlatformVndkVersion property" into main am: 6954bd2337 am: 762d78f2f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000610

Change-Id: I17ec9730acd6e458fdfab61fa3a304b3761e35ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-03 01:39:34 +00:00
Kiyoung Kim
6954bd2337 Merge "Remove PlatformVndkVersion property" into main 2024-04-03 00:48:04 +00:00
Jesse Melhuish
50702c5fd7 Merge "Allow Multilib in override_apex" into main am: 219ce55481 am: 7dadc453d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3019828

Change-Id: I66e587c770d55e951ba4b0de0edddd094e5fac3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-01 14:55:34 +00:00
Kiyoung Kim
fa13ff194c Remove PlatformVndkVersion property
Platform VNDK version is no longer available based on VNDK deprecation.
Remove all code using Platform VNDK version.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7d0f7e23eff5d153346890f242a94b78bad6736b
2024-04-01 16:37:20 +09:00
Jesse Melhuish
ec60e25a1c Allow Multilib in override_apex
Test: m nothing --no-skip-soong-tests
Test: go test apex_text.go
Bug: 246854990
Change-Id: Id6e31c63acd87466a4436288d550ce6b298c677d
2024-03-29 21:13:57 +00:00
Treehugger Robot
6d08d4eea6 Merge "Add required, host_required, and target_required as dependencies" into main am: e58af3da5a am: 6116be9092
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3000612

Change-Id: Id534cb12d9786af0d99fd30f0389e02725309803
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 04:48:32 +00:00
Treehugger Robot
e58af3da5a Merge "Add required, host_required, and target_required as dependencies" into main 2024-03-25 04:10:50 +00:00
Thiébaud Weksteen
6e70e0ca25 Merge "Support multiple sources for prebuilt_etc" into main am: d3348dbaaa am: 127610b214
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3003676

Change-Id: Iba61477fd62fbaac95ac44166b76e5b93baeb86a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 23:53:08 +00:00
Thiébaud Weksteen
d3348dbaaa Merge "Support multiple sources for prebuilt_etc" into main 2024-03-21 23:14:48 +00:00
Thiébaud Weksteen
00e8b31ee6 Support multiple sources for prebuilt_etc
Keep the Src attribute for compatibility. The new attribute (Srcs) is
mutually exclusive with Src.

Keep SourceFilePath and OutputFile for compatibility with other modules.
These can be removed in a follow up change.

Bug: 328313691
Test: presubmit
Test: m blueprint_tests
Test: prebuilts/build-tools/build-prebuilts.sh (on build-tools branch)
Change-Id: I5d5b2657715a7180a829c7ed0f501872d561b662
2024-03-21 11:30:15 +11: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
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