From 1ccea0574f2c1a00d94bd67b8b976a21e0f66e51 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 22 Jun 2022 16:42:26 +0000 Subject: [PATCH] Do not override setting of SOONG_CONFIG__module_source_build (cherry picked from commit dccd189954c52d2726cfd287a7a230f4b837f285) 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. Merged-In: I1dffeb055a68250f574630d4ef5fedc51bad4a2b 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 6e521950ee..cdd48e7cc6 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -78,7 +78,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