aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2021-07-21 16:59:53 +0100
committerMathew Inwood <mathewi@google.com>2021-07-28 10:05:29 +0000
commit523de300dda61b204b855b3aad5489c8be464720 (patch)
tree506947b12d2f9b279dfb17f7fe3c846f783ebf04
parent008599f7e96599dc55e6976fab21cd8a6abaa534 (diff)
downloadbuild-523de300dda61b204b855b3aad5489c8be464720.tar.gz
Force MODULE_BUILD_FROM_SOURCE if com.google.android.xxx modules aren't
installed. Test: env TARGET_PRODUCT=redfin build/soong/soong_ui.bash \ --dumpvar-mode SOONG_CONFIG_ANDROID_module_build_from_source returns "" Test: env TARGET_PRODUCT=aosp_redfin build/soong/soong_ui.bash \ --dumpvar-mode SOONG_CONFIG_ANDROID_module_build_from_source returns "true" Test: env TARGET_PRODUCT=coral_hwasan build/soong/soong_ui.bash \ --dumpvar-mode SOONG_CONFIG_ANDROID_module_build_from_source returns "true" Bug: 193759980 Bug: 192556458 Bug: 194067130 Change-Id: I8023564e6e22969a9b18467ec8b1ef046333e181
-rw-r--r--core/android_soong_config_vars.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 1023337fb4..39f01550fb 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -29,6 +29,14 @@ $(call add_soong_config_namespace,ANDROID)
$(call add_soong_config_var,ANDROID,TARGET_ENABLE_MEDIADRM_64)
$(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE)
+ifeq (,$(filter com.google.android.conscrypt,$(PRODUCT_PACKAGES)))
+ # Prebuilt module SDKs require prebuilt modules to work, and currently
+ # prebuilt modules are only provided for com.google.android.xxx. If we can't
+ # find one of them in PRODUCT_PACKAGES then assume com.android.xxx are in use,
+ # and disable prebuilt SDKs. In particular this applies to AOSP builds.
+ MODULE_BUILD_FROM_SOURCE := true
+endif
+
# TODO(b/172480615): Remove when platform uses ART Module prebuilts by default.
ifeq (,$(filter art_module,$(SOONG_CONFIG_NAMESPACES)))
$(call add_soong_config_namespace,art_module)