From dccd189954c52d2726cfd287a7a230f4b837f285 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 22 Jun 2022 16:42:26 +0000 Subject: Do not override setting of SOONG_CONFIG__module_source_build Previously, any setting of SOONG_CONFIG__module_source_build (where 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 --- core/android_soong_config_vars.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index 711518ed70..2880b287c5 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -130,7 +130,8 @@ INDIVIDUALLY_TOGGLEABLE_PREBUILT_MODULES := \ 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 -- cgit v1.2.3