By setting aconfig_flags: true, soong filesystem module installs the
aconfig_flags.pb file to its etc directory.
We need to define aconfigFilePaths to ModuleBase to store the list of
aconfig file paths that is generated from the GenerateBuildActions().
The aconfigFilePaths are collected when build the filesystem module
to build the aconfig_flags.pb for the filesystem image.
Bug: 335363964
Test: compare the cache list with those generated from make.
Change-Id: Ia32b566bf43174e94b9e610b9503608c6b583899
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
Sorted iteration ensures that `mergeAconfigFiles` generates the ninja
rules in a deterministic fashion.
Test: mv out/soong/build.ninja; regenerate; compare; bit-identical
after this change
Change-Id: Ic9bee14374fa1eb7adee670eaed42ad6ffdd9010
Only when aconfig_declarations explicitly set this property true,
its flags will be repackaged.
If a java_aconfig_library has mode "exported", its corresponding
aconfig_declarations must have exportable prop set to true.
Test: Added unit tests and CI
Bug: 310504781
Ignore-AOSP-First: this change will be cherry picked to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4527f3010b3fd6f33948a15a9b4fdc944da34f0)
Merged-In: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
Change-Id: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
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
Aconfig file dependencies are module-independent, and properly part of
ModuleBase.
Bug: b/308625757
Test: manual
Change-Id: I38c5907d1671cc69bb198345201316ae781fdc9f
This method allows dependencies on non-Android modules, which it ignores
in strict mode, rather than flagging the dependency as an error.
Bug: none
Test: manual
Change-Id: I9575e46638fa8ffc69c8935b1b65aab37ceab3c3
To prevent errors, when we collect dependencies for a module, walk the
blueprint modules, and ignore blueprint and disabled modules.
This avoids errors in validateAndroidModule when a android.Module (such
as a genrule) depends on a blueprint.Module, and strict checking is
enabled.
Bug: 308625757
Test: manual
Change-Id: I11f0a0b504aa18d6d786cc91319b9d1d9497c04f