Do not override setting of SOONG_CONFIG_<m>_module_source_build
Previously, any setting of SOONG_CONFIG_<m>_module_source_build (where
<m> is one of wifi, uwb or bluetooth) that was made before the
core/android_soong_config_vars.mk was processed would be replaced with
false. This change will only set them to false if they have not been
previously set.
Bug: 233965247
Test: m nothing
# After setting SOONG_CONFIG_wifi_module_source=true before this
# code. Without this change out/soong/soong.variables uses false
# for the wifi_module/module_source config variable. With this
# change it uses true.
Change-Id: I1dffeb055a68250f574630d4ef5fedc51bad4a2b
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 711518e..2880b28 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -130,7 +130,8 @@
wifi \
$(foreach m, $(INDIVIDUALLY_TOGGLEABLE_PREBUILT_MODULES),\
- $(call soong_config_set,$(m)_module,source_build,$(MODULE_BUILD_FROM_SOURCE)))
+ $(if $(call soong_config_get,$(m)_module,source_build),,\
+ $(call soong_config_set,$(m)_module,source_build,$(MODULE_BUILD_FROM_SOURCE))))
# Apex build mode variables
ifdef APEX_BUILD_FOR_PRE_S_DEVICES