platform_build_soong/android/soongconfig
Paul Duffin e8b4768134 Avoid separate call to module factory to create conditional properties
Previously, the soong_config_module_type (and related module types)
would make a special call to the module factory of the module type
being customized to get the properties from which it created the
conditional properties. That caused problems when trying to customize
a singleton module. See the bug for more details.

This change avoids that special call by deferring the creation of the
conditional properties struct until just after the
soong_config_module_type's factory function calls the customized module
factory to create the module and properties. The properties are then
used to create the conditional properties struct avoiding the extra
factory call.

The conditional properties struct is only created once per module type
that soong_config_module_type (and related module types) creates.

Bug: 264876909
Test: m nothing
Change-Id: I55dc71d2553cb59d921a96c6458d0bc877512bbb
2023-01-09 16:49:00 +00:00
..
Android.bp Add package for printing starlark formatted data 2022-02-08 17:32:28 -05:00
config.go Add conditions_default for soong config variables. 2021-01-21 14:25:20 -05:00
modules.go Avoid separate call to module factory to create conditional properties 2023-01-09 16:49:00 +00:00
modules_test.go Revert^4 "Prevent unspecified values in soong_config_string_variables" 2022-11-01 17:10:23 +00:00