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
This commit is contained in:
Martin Stjernholm 2021-07-21 16:59:53 +01:00 committed by Mathew Inwood
parent 008599f7e9
commit 523de300dd
1 changed files with 8 additions and 0 deletions

View File

@ -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)