summaryrefslogtreecommitdiff
path: root/android/module.go
AgeCommit message (Collapse)Author
2025-01-14Select supports product_variable("eng") kellyhung
Bug: 323382414 Bug: 387922915 Test: run soong test pass Change-Id: Ic2975517c3837e4c8d05c0c5b91db48c9d34cabc
2025-01-10Merge changes Ie937a236,I74e6ebef,Ib8020db0 into main Yu Liu
* changes: Convert hasCode and aaptLibs to use ModuleProxy. Convert validatePartitionType and checkJniLibsSdkVersion to use ModuleProxy. Convert getLibsForLinkerConfig to use ModuleProxy.
2025-01-10Merge "Convert install and checkContainerViolations to use ModuleProxy." ↵ Yu Liu
into main
2025-01-10Merge changes Ie3b6d1f8,Id465f293 into main Yu Liu
* changes: Convert CollectAllSharedDependencies to use ModuleProxy. Convert depsToPaths to use ModuleProxy for both cc and rust.
2025-01-08Convert getLibsForLinkerConfig to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Ib8020db0d1cf9e035ace52e2a893bb3df7975127
2025-01-08Convert install and checkContainerViolations to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I19ec2142415e88d7486ee58613065f8cdb6aca73
2025-01-08Convert CollectAllSharedDependencies to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Ie3b6d1f8fa684ab191123bd57645b86f3bfa97b4
2025-01-08Convert depsToPaths to use ModuleProxy for both cc and rust. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Id465f293c3615fc803b34c990f19b4386ebece1c
2025-01-08Support disting in soong-only builds Cole Faust
Disting was normally handled by the packaging kati step, which was not run in soong-only builds. Disting needs to be done in a separate ninja file, so that if you toggle dist on/off you only need to regenerate a small ninja file instead of the main one. This change makes it so that the kati packaging step is also run in soong-only builds. (which makes them not technically soong-only, but the packaging step is very fast so it's fine) Phonies in soong were normally exported to the main make invocation and then make would emit the ninja rules for them. In soong-only builds soong would emit the ninja phone rules directly. This is problematic when supporting disting in soong, because some of the phony rules have the same name as dist targets, causing ninja to complain about duplicate rules. To resolve this, make soong export its phonies to the packaging step, which will dedup them with the dist phonies. Bug: 388312357 Test: m --soong-only dist Change-Id: If6de8c28274fe96dac674f449b9bc0b488540655
2024-12-26Add vintf_fragment modules as required dependencies Jihoon Kang
vint_fragment modules are automatically added as required dependencies in Androidmk entries generation, but is not being added as Soong required install dependencies. This change allows the vint_fragment modules to be automatically installed, matching the behavior in make. Test: unpack and diff soong and make generated vendor_ramdisk partitions Bug: 322089980 Bug: 381888358 Change-Id: I697b32c9dacec7a35f9fca62bedae1d3e563568e
2024-12-17Convert computeInstallDeps and buildLicenseMetadata to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I63da95a938404b9d56cea65143479a961b82e051
2024-12-06Convert buildApexDependencyInfo to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I7527d331b31a3a97587ca76105e9facb99624bde
2024-12-05Convert checkStaticLinkingToStubLibraries to use module proxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Id776727a431f2ce8fd4c7b352dc0bd282ac57f90
2024-12-04Merge "Revert^2 "Use soong built autogenerated RROs"" into main Spandan Das
2024-12-03Revert^2 "Use soong built autogenerated RROs" Spandan Das
e8ef6f1540ca7518e2e2998779b5f2d37b7a1479 Change-Id: I0c563712da65c7bc4ef73633401cb5151cb49d3f
2024-12-03Merge "Revert "Use soong built autogenerated RROs"" into main Liana Kazanova
2024-12-03Revert "Use soong built autogenerated RROs" Liana Kazanova
Revert submission 3362490-autogen_app_overlay Reason for revert: DroidMonitor: Potential culprit for http://b/382076898 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reverted changes: /q/submissionid:3362490-autogen_app_overlay Change-Id: Ib3eb370625a4ab2cbf9a1337f82a1f0bc281a3a8
2024-12-03Change checkJavaStableSdkVersion to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I221f4ea7479d512d49cfb40a8cb06bba62ec2c7a
2024-12-03Merge "Use soong built autogenerated RROs" into main Spandan Das
2024-12-03Use soong built autogenerated RROs Spandan Das
At ToT, soong emits metadata to make (LOCAL_SOONG_PRODUCT_RRO_DIRS and LOCAL_SOONG_DEVICE_RRO_DIRS), and make uses this metadata to build and install apks that are intalled in /vendor or /product. This CL ports this logic to soong. This CL autogenerates these modules in a load hook for android_app and override_android_app, and adds them to the `LOCAL_REQUIRED_MODULES` of the base app. The autogenerated modules will inherit the enabled property of the apps. This required me to add `Target.Android.Enabled` to commonProperties in ModuleBase. Since autogeneration happens in soong now, `LOCAL_SOONG_(DEVICE|PRODUCT)_RRO_DIRS` no longer needs to be exported. Followup work - Installing the overlay variants for soong built filesystems. Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug Test: no diff in system, vendor, product file_list.txt Test: m out/target/product/vsoc_x86_64/vendor/overlay/SystemUI__aosp_cf_x86_64_phone__auto_generated_rro_vendor.apk the apk is not bit-identical, but this is likely due to different aapt link flags between make and soong (e.g. `--enable-compact-entries` is added as default in soong but not in make Test: aapt2 diff SystemUI__aosp_cf_x86_64_phone__auto_generated_rro_vendor.apk.before SystemUI__aosp_cf_x86_64_phone__auto_generated_rro_vendor.apk.after reports no diffs Change-Id: I9b212a4ed443250a63dbe27cb955c6f133cff9af
2024-12-02Auto generate recovery partition Jihoon Kang
This change conditionally auto generates the recovery partition in filesystem_generator. Test: m soong_generated_recovery_filesystem_test Bug: 381888358 Change-Id: I8938e842d8587ec1c986542385ed50c19dc1c76d
2024-11-27Merge "Reland^2 : Do not allow vintf_fragments for modules installed in the ↵ Kiyoung Kim
filesystem"" into main
2024-11-27Reland^2 : Do not allow vintf_fragments for modules installed in the filesystem" Kiyoung Kim
Soong defined filesystem does not have any logic to handle vintf_fragments items, so those item should be used with vintf_fragment modules instead. This change checks if there is any module installed in the Soong defined filesystem and defines vintf_fragments property, and raises error for those modules. Bug: 322089980 Change-Id: Idd4c406c90571a07ff2cabd5629073d338af795c Test: There is no diff between vintf manifests of generic_system_image and aosp_cf_x86_64_phone
2024-11-26Add vendor_ramdisk support in PartitionTag Jihoon Kang
To allow vendor_ramdisk modules to be recognizeable by partition tag. Test: m soong_generated_vendor_ramdisk_filesystem_test Test: CI Bug: 381104942 Change-Id: I954772fc7ec6411191ac8a6e364f67d76814ebfe
2024-11-26Merge "Revert "Reland: Do not allow vintf_fragments for modules installed in ↵ Treehugger Robot
the filesystem"" into main
2024-11-26Revert "Reland: Do not allow vintf_fragments for modules installed in the ↵ Kiyoung Kim
filesystem" This reverts commit df17e7b6c3c7d26efab1ec9fbcffdf16c325a229. Reason for revert: Build failure from git_main/seahawk target Change-Id: I320864ae76101a5fd5e3b4ca6daa11bad3548ae7
2024-11-26Merge "Reland: Do not allow vintf_fragments for modules installed in the ↵ Treehugger Robot
filesystem" into main
2024-11-21Add support for selects on string lists Cole Faust
Bug: 375341427 Test: m nothing --no-skip-soong-tests Change-Id: I6ecab80f054e8594dacbeaaa33714b2f55af16b5
2024-11-20Reland: Do not allow vintf_fragments for modules installed in the filesystem Kiyoung Kim
Soong defined filesystem does not have any logic to handle vintf_fragments items, so those item should be used with vintf_fragment modules instead. This change checks if there is any module installed in the Soong defined filesystem and defines vintf_fragments property, and raises error for those modules. Bug: 322089980 Change-Id: I6b21da631bb2f807afe9d88a1a8e892fde23509a Test: There is no diff between vintf manifests of generic_system_image and aosp_cf_x86_64_phone
2024-11-19Revert "Do not allow vintf_fragments for modules installed in the filesystem" Chaitanya Cheemala (xWF)
This reverts commit d3d89ede5d31c6175915dc4516bf6cd5cb3cd350. Reason for revert: Likely culprit for b/379811732 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Change-Id: I9d70e7ae4a7c9663d6bc25f0291df615dfc6d58b
2024-11-14Do not allow vintf_fragments for modules installed in the filesystem Kiyoung Kim
Soong defined filesystem does not have any logic to handle vintf_fragments items, so those item should be used with vintf_fragment modules instead. This change checks if there is any module installed in the Soong defined filesystem and defines vintf_fragments property, and raises error for those modules. Bug: 322089980 Test: There is no diff between vintf manifests of generic_system_image and aosp_cf_x86_64_phone Change-Id: Ia03636e5d2975ab451650f70f66b46d7cd53e43a
2024-11-13Use VisitAllModuleVariantProxies in generateModuleTarget. Yu Liu
Also rename android.CommonPropertiesProvider to android.CommonModuleInfo. Bug: 377723687 Test: Compare the ninja and mk files generated. Change-Id: Iea46c16234204eef808b590b5cc1b43b5a874636
2024-11-13Merge "Revert^2 "Use VisitDirectDepsProxy in GenerateBuildActions and remove ↵ Yu Liu
the"" into main
2024-11-13Revert^2 "Use VisitDirectDepsProxy in GenerateBuildActions and remove the" Yu Liu
This reverts commit b51cd7100365dad2e27366402e7aab55bae09a7d. Reason for revert: Reland the change since the depending cl was merged. Change-Id: I88cbdc1b26a8ab9c91f33ec65ff43b80f324b832
2024-11-12Change GetModuleFromPathDep to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Compare ninja and mk files generated. Change-Id: I428b0965b217adb20a792ebde88374e0c6fae9d6
2024-11-11Build ramdisk with soong Cole Faust
This is the first step to build the ramdisk, it still has some diffs with with the make-generated ramdisk though. Bug: 378146476 Test: m soong_generated_ramdisk_filesystem_test Change-Id: I767ea9d09e4d6413c2ec5af3120595e2001c9bb7
2024-11-11Revert "Use VisitDirectDepsProxy in GenerateBuildActions and remove the" Liana Kazanova
This reverts commit 6c1a6354afdd1098b311863c033b7e374ec98302. Reason for revert: DroidMonitor: Potential culprit for http://b/378544804 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Change-Id: I945c78e3ab4f321e2db99a3193cf35fd8b307073
2024-11-11Use VisitDirectDepsProxy in GenerateBuildActions and remove the Yu Liu
duplicated validation. Bug: 377723687 Test: Check the ninja and mk files. Change-Id: I16729c2e8beaa03301fa55e27f3ccfa120a02c16
2024-11-07Replace FinalModule with IsFinalModule. Yu Liu
Bug: 377723687 Test: Compare generated mk and ninja files. Change-Id: I287b5a56aebf5fed0911bf8fbfc968d7aebc0dea
2024-11-06Add *_dlkm properties to android.ModuleBase Spandan Das
To aid mk->bp migration of (system|vendor|odm)_dlkm.img files, https://r.android.com/3331335 introduced properties to prebuilt_etc to allow installation of soong etc modules in these partitions. The dlkm.img files package .ko files and build.prop files. The current plan is to use `prebuilt_kernel_modules` soong module type to package the .ko files and create additional modules.* metadata files. To aid this migration, this CL moves the _dlkm_specific properties to android.ModuleBase and updates `modulePartition` to return the corresponding dlkm partition. Bug: 377562851 Test: m nothing --no-skip-soong-tests Test: m installclean && m fs_config_files_system_dlkm verified that $PRODUCT_OUT/system_dlkm/etc/fs_config_files exists Change-Id: Ia398a85a9a2b81532871a5ab88454317039f44b9
2024-11-06Collect kythe, obj and tidy files using ModuleProxy. Yu Liu
Bug: 358427516 Test: Manually compare the generated mk and ninja files. Change-Id: Ibee605372b1fae48ee9fbd8872b4ea0f6b1d5a7d
2024-10-31Distinguish HideFromMake from SkipInstall Spandan Das
Invoking HideFromMake today would also make the module uninstallable. This was a safe assumption since the packaging sytem was in build/make - if a module is not visible to make, it is also uninstallable. With the advent of soong packaging system, this might not always be true. This CL disentangles SkipInstall from HideFromMake. This CL also sets SkipInstall on modules where the installation rules should not be emitted, e.g. to prevent duplicate installation rules between platform and apex variants of libraries Test: m nothing --no-skip-soong-tests Test: no diff in aosp_cf_x86_64_phone's system file_list.txt Change-Id: I80cdd60d2ebdba22fd37e748eb00242cc412bda1
2024-10-29Revert^2 "Convert cc modules to use AndroidMkInfoProvider." Yu Liu
This reverts commit 37e6794ad44926e64c1f733dbe32bbf5a40efe77. Reason for revert: reland with fix to the test Bug: 358427516 Test: Unit tests and manually compare generated mk files. Change-Id: Iddc34471f15cfe0c8ed863d05a1344e295925565
2024-10-28Implement the 1-variant fallback in the image mutator Cole Faust
Some of the modules that deal with different image variants are not straightforward to replace with equivalent properties. Just reimplement the 1-variant fallback in the image mutator so that we don't have to worry about it for the moment. Having only the image mutator and not the arch/os mutators implement this should prevent the "more fallbacks than before" issues that I saw when converting all 3 of them to have this behavior. Bug: 372091092 Test: m nothing Change-Id: I9588e0bb9436ac5ddad750c1e70d883d5fe07630
2024-10-25Merge "Remove overriden modules from deps of autogenerated filesystem ↵ Treehugger Robot
modules" into main
2024-10-25Remove overriden modules from deps of autogenerated filesystem modules Spandan Das
`android_filesystem` supports overrides, but only if the module is overriden by another module in its deps. For AOSP CF, the autogenerated system.img contains an additional /bin/charger. The Kati system.img does not contain this file because it is overriden by a module which is installed in /vendor. This CL updates the autogen mutators to remove a module from deps if it is overriden by another module in PRODUCT_PACKAGES or by a transitve required module dependency of PRODUCT_PACKAGES Test: go test ./fsgen Test: verified that /bin/charger no longer appears in diff_test of system for aosp_cf_x86_64 Change-Id: Idafa1db07a42519ba3c441f851480b1c6faa63b8 Change-Id: If09050a6fd110d07d975595644dba85c740027e2
2024-10-24Move some gob helpers to a new package. Yu Liu
Bug: 358427516 Test: CI Change-Id: Ib25bbfb6e89c35cf4a080e2baaffadabf0e5636e
2024-10-24Update DepSet references Colin Cross
Update all references to depset to use blueprint/depset, and to use DepSet instead of *DepSet. Bug: 375276086 Test: all soong tests pass Flag: EXEMPT refactor Change-Id: I59a7836d0975366ddc336225fb770ac7e6e0c8ea
2024-10-17Merge "Revert "Convert cc modules to use AndroidMkInfoProvider."" into main Colin Cross
2024-10-17Revert "Convert cc modules to use AndroidMkInfoProvider." Priyanka Advani (xWF)
This reverts commit 5640008749795a6ebfb2680e28daa6b067207ce8. Reason for revert: Droidmonitor created revert due to b/374130363. Will be verifying through ABTD before submission. Change-Id: Iced10a8b71766826465966e9370cdd5e347e7b79