summaryrefslogtreecommitdiff
path: root/android/module.go
AgeCommit message (Collapse)Author
2024-10-17Merge "Convert cc modules to use AndroidMkInfoProvider." into main Yu Liu
2024-10-17Revert^4 "Set the appropriate deps property for the soong generated fs modules" Jihoon Kang
This change relands https://r.android.com/3304859. Test: m nothing --no-skip-soong-tests && ABTD Bug: 372771060 Change-Id: Ie798fee2a71c14d5e8ac5e2433394bbb090cd595
2024-10-15Convert cc modules to use AndroidMkInfoProvider. Yu Liu
Bug: 358427516 Test: Unit tests and manually compare generated mk files. Change-Id: I90d8ecb3580d6324ed53212d01d7c24b6e4bb700
2024-10-10Remove dependencies on 1-variant fallback Cole Faust
This is just a first pass, there are still more issues to tackle. But after this we start getting errors about genrules which require more work to resolve, so I'll handle them in a separate cl. Bug: 372091092 Test: m nothing --no-skip-soong-tests Change-Id: Ibf8f6bca699ff7c3232495ae7fa2666c967ba90b
2024-10-10Merge "Add product variable SelinuxIgnoreNeverallows for sepolicy" into main Treehugger Robot
2024-10-09Make java binaries common instead of common-first Cole Faust
Previously, java binaries had both common and the first arch variants. This was origionally added in aosp/556843. The reasoning there was so that a java binary could be used as the dependency of a genrule. However, now with transition mutators, we can make the incoming transition redirect the arch variant to the common variant if the module only has a common variant. This allows genrules to depend on the common arch variant easily. That change is also included in this cl. Bug: 372091092 Test: m nothing --no-skip-soong-tests Change-Id: Iea612d050bff608d661f81566884653239015213
2024-10-08Add product variable SelinuxIgnoreNeverallows for sepolicy kellyhung
This topic also fix build fail on git_main on seahawk-next-userdebug(b/371922616) Bug: 350881031 Test: Presubmits Change-Id: I7dbfadde100d833994f3d0429e358ff10d26fc6e
2024-10-07Drop `common_first` special-case from `addRequiredDeps` Spandan Das
This special-case was added to prevent installation of both variants of libraries listed in `required` of `java_binary`. https://r.android.com/3293143 makes it an error for native libs to be listed in `required` of `java_binary`. Since this special-case is redundant now, we can remove it. Test: presbumits Change-Id: Ib6fe771f5c67d72935684ac8dcb275cf57337870
2024-10-07Add ModuleProxy that should be used when visiting deps. Yu Liu
Bug: 358427516 Test: local manual tests to compare the generated mk and ninja files. Change-Id: I2bbe2e679e404a46947f3895943dad749be38446
2024-10-05Change the way to support custom gob encoder and decoder. Yu Liu
Use public structs instead of manually encoding/decoding individual unexported fields to fully utilize the capability of Gob's default encoder and decoder. Bug: 358427516 Test: manual tests and CI. Change-Id: I5f5b6c8368e6449acc45c8c492777329636b3d41
2024-10-04Install dexpreopt artifacts of apex system server jars in same partition Spandan Das
e.g. If a system server jar providing apex is installed in /system_ext, the dexpreopt files of that jar will also be installed in /system_ext. Currently, all of these artifacts are installed in /system This behavior will be flag guarded by RELEASE_INSTALL_APEX_SYSTEMSERVER_DEXPREOPT_SAME_PARTITION. This is necessary because the ART runtime needs to be updated to look in the new /system_ext location. Since some release configs build with ART prebuilts, the runtime in those prebuilt apexes will not have the additional search path introduced in https://r.android.com/3287191 Test: Verified that "Could not check odex file" does not appear for service-compos (a system_ext apex systemserver jar) Bug: 369678122 Change-Id: I752bdc7f5f69226b503800ce25726a211302cb07
2024-09-30Merge "Support select for product variable "build_from_text_stub"" into main Treehugger Robot
2024-09-30Merge "Find matching variant of `required` for `common_first`" into main Treehugger Robot
2024-09-30Support select for product variable "build_from_text_stub" Jihoon Kang
This allows using select syntax on the product variable "build_from_text_stub" Test: m nothing --no-skip-soong-tests Bug: 323382414 Change-Id: I73b687a4034990443e26eb3bef24c8b07acb75b4
2024-09-28Find matching variant of `required` for `common_first` Spandan Das
Both 32-bit and 64-bit variants of native deps were getting installed in Soong-built system image if they were listed in `required` of `java_binary`. java_binary(s) have two variants, a "common" and an arch variant (the first arch). Previously the common variant will create a dependency to both 32-bit and 64-bit variants of their dependencies. With this CL, common variant will not create a dependency on required unless the requested `target` is also the common target. Test: Ran the filelistdiff tool Test: go test ./java -run TestNativeRequiredDepOfJavaBinary Bug: 369678122 Change-Id: Ica97e12eefb45929ca653ec57c3339e4a3b72a76
2024-09-27Remove blueprint.Module helper functions Colin Cross
Now that blueprint_go_binary modules are wrapped in a module type that implements android.Module Soong should never see a blueprint.Module. Remove the versions of the context methods that allow working with blueprint.Modules. Genrules still need VisitDirectDepsAllowDisabled, as they use a hack that adds dependencies on host tools after the prebuilts mutators have run, which means they may have a dependency on a disabled prebuilt and need to manually forward it to the corresponding source module. Test: all soong tests pass Flag: EXEMPT refactor Change-Id: I9147b450269749326e8fe75c5af310bd2d898d8c
2024-09-25Merge "Check if vintf_fragment modules' target partition" into main Kiyoung Kim
2024-09-24Check if vintf_fragment modules' target partition Kiyoung Kim
Current implementation allows vintf_fragment to be installed in the different partition of a module referenced it via vintf_fragment_modules, but this is unexpected behavior and should be caught from the build system to avoid any unintended mistakes. This change checks target parition of vintf_fragment module and any modules referencing it, and fails if there is any mismatch found. Bug: 322089980 Test: aosp_cf_x86_64_phone build succeeded Change-Id: Ie8152d2f2616726e44a99fb1261be292f2b9ad54
2024-09-20Merge "Make init_rc property configurable" into main Inseob Kim
2024-09-19Make init_rc property configurable Inseob Kim
Bug: 331320802 Test: build Change-Id: Id9c85f2f80381febf360fe320ee43017ec9948b1
2024-09-17Merge changes I41978037,I19e8a9e8 into main Treehugger Robot
* changes: Properly initialize android_system_image modules Add otherModuleProvider to ConfigurableEvaluatorContext
2024-09-17Merge "Convert arch and os mutators to TransitionMutators" into main Colin Cross
2024-09-16Convert arch and os mutators to TransitionMutators Colin Cross
Replace archMutator and osMutator with TransitionMutators. Bug: 319288033 Flag: EXEMPT refactor Test: all soong tests pass Test: no change to out/soong/*.ninja Change-Id: I92a4d7c895dd79f1dd8064d0ca90e7010b563525
2024-09-16Add otherModuleProvider to ConfigurableEvaluatorContext Cole Faust
So that it can make decisisons based on a provider set by the base config mutator. Bug: 361816274 Test: m nothing Change-Id: I19e8a9e800dfabcd05740f9c0ed5db833c5b2377
2024-09-13Prevent evaluating configurable properties before the defaults mutator Cole Faust
So that we can change the configuration after the defaults mutator has run. Bug: 361816274 Test: Presubmits Change-Id: I550088b2555d275a86b5dd4d57e85a9ece859233
2024-09-12Don't evaluate the enabled property in a defaultable hook Cole Faust
So that we can decide the configuration after defaults are evaluated. Instead, pass the enabled property on to submodules. Bug: 361816274 Test: m nothing --no-skip-soong-tests Change-Id: I853d557ed022f7434287cea0a2a19e684b59e145
2024-09-11Rename ConfigAndErrorContext to ConfigurableEvaluatorContext Cole Faust
I'm going to be adding some methods to this interface, give it a name based on how it's going to be used, not based on what methods it contains. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I9bba04ba756c4dbe00625e2d04af81e78a11cae9
2024-09-05Merge "Add VINTF fragment modules into required libs of modules-info" into main Treehugger Robot
2024-09-04Merge "Move the caching/restoring code from soong to blueprint to fully skip ↵ Yu Liu
build actions." into main
2024-09-04Move the caching/restoring code from soong to blueprint to fully skip build ↵ Yu Liu
actions. Bug: 358425833 Test: Manually verified the generated ninja and mk files and CI. Change-Id: Ieebb822c46f37c0ff55fad08531e9870a76cbd7b
2024-09-04Merge "Move checkbuild targets of Soong modules into Soong" into main Colin Cross
2024-09-04Merge "Make overrides work in Soong" into main Jiyong Park
2024-09-03Move checkbuild targets of Soong modules into Soong Colin Cross
Pass the name of Soong's checkbuild target for each module to Make so that it can depend on it from the main checkbuild rule. This will give better control over which files get built, allowing checkbuild to skip the jar combining step when transitive classpath jars are enabled. The per-module checkbuild targets are passed to make instead of added directly as a dependency of checkbuild in order to maintain the existing behavior of only building modules exposed to make in checkbuild. Also tweak the existing calls to CheckbuildFile and add InstallFileWithoutCheckbuild to match the files that are in the Make-based checkbuild. Bug: 308016794 Test: m checkbuild Change-Id: Ic5140819381d58f4d00f23a7a12447950c4cf268
2024-09-02Make overrides work in Soong Jiyong Park
This change adds `overrides` property to all module types. It is used to prevent another module (or modules) from being installed or packaged. Bug: 330141242 Test: go test ./... Change-Id: I4f05c603f0c5dbb699d00327882c7498472b59de
2024-08-30Merge "Revert^4 "Implement detecting container violations."" into main Jihoon Kang
2024-08-29Revert^4 "Implement detecting container violations." Jihoon Kang
This change introduces a method to detect violating inter-container dependencies between modules. The method is run in `ModuleBase.GenerateBuildActions`, after the container info provider is set. Given that the provider of the direct dependencies would have been set at this time, the method utilizes this information to determine the violations, which are introduced in https://r.android.com/3141104. Note that this enforcement does not turn all inter-container dependencies as errors. Instead, it will only turn dependencies that matches the pre-defined violations into errors. Even if the dependency matches the violation, an error will not be thrown if the dependency satisfies any of the exception functions (e.g. the dependent module is stubs, or the two modules belong to the same apexes). Test: m nothing --no-skip-soong-tests Bug: 338660802 Change-Id: Ib9ddc0761fa46f1309b1a1a4f759d9a4e04fd70e
2024-08-29Merge "Remove containersInfo, complianceMetadataInfo and aconfigFilePaths ↵ Yu Liu
from ModuleBase." into main
2024-08-29Add VINTF fragment modules into required libs of modules-info Kiyoung Kim
Currently modules-info.json misses modules from vintf_fragment_modules because it was not handled from Soong. This change adds vintf_fragment_modules as part of required modules of modules-info.json so it can be handled from any other logic handles build information with the json file. Bug: 322089980 Test: An artifact depends on the modules-info.json handles vintf_fragments modules properly. Change-Id: I09a61b2ed201099a9d3b05dbed061d0366bb9255
2024-08-28Merge "Revert^3 "Implement detecting container violations."" into main Priyanka Advani (xWF)
2024-08-28Revert^3 "Implement detecting container violations." Priyanka Advani (xWF)
2a88491afc72707c21a125b81f7dcd252d2fc5f1 Change-Id: Iba4527f391a093703978fe01177b56fec4604b28
2024-08-28Merge changes Ia693c4a5,I8e5620d2 into main Jihoon Kang
* changes: Revert^2 "Implement detecting container violations." Define additional container violations
2024-08-28Revert^2 "Implement detecting container violations." Jihoon Kang
This change introduces a method to detect violating inter-container dependencies between modules. The method is run in `ModuleBase.GenerateBuildActions`, after the container info provider is set. Given that the provider of the direct dependencies would have been set at this time, the method utilizes this information to determine the violations, which are introduced in https://r.android.com/3141104. Note that this enforcement does not turn all inter-container dependencies as errors. Instead, it will only turn dependencies that matches the pre-defined violations into errors. Even if the dependency matches the violation, an error will not be thrown if the dependency satisfies any of the exception functions (e.g. the dependent module is stubs, or the two modules belong to the same apexes). Test: m nothing --no-skip-soong-tests Bug: 338660802 Change-Id: Ia693c4a53369c757a3e96656a769405c759b111c
2024-08-28Merge "Remove packagingSpecsDepSet from ModuleBase." into main Yu Liu
2024-08-28Merge "Revert "Implement detecting container violations."" into main Satish Yalla
2024-08-28Revert "Implement detecting container violations." Satish Yalla
This reverts commit bb678f82d6bb5cd89bf282e88a879123d9763d61. Reason for revert: Droidmonitor created revert due to b/362639013. Will be verifying through ABTD before submission. Change-Id: I1dcb71672eeb44a17cf176d3731bcaf9aaf81edf
2024-08-28Merge "Implement detecting container violations." into main Treehugger Robot
2024-08-28Merge changes from topic "ctx_in_ideinfo" into main Treehugger Robot
* changes: Add ctx argument to IDEInfo() Add configurable property support to neverallow
2024-08-28Merge "Remove moduleInfoJSON from ModuleBase." into main Yu Liu
2024-08-28Remove containersInfo, complianceMetadataInfo and aconfigFilePaths from ↵ Yu Liu
ModuleBase. Bug: 358425833 Test: Manually verified all the generated ninja and mk files and CI. Change-Id: I896659491e75bb2eacca93d2e4a83ead50e218d2
2024-08-27Merge "Make IdeInfo into a provider" into main Treehugger Robot