Merge "Work around `art-host-tests` build issues when using ART prebuilts." into sc-dev
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 1023337..39f0155 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -29,6 +29,14 @@
 $(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)
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 180c72b..14ce1af 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -151,6 +151,7 @@
     libgui \
     libhardware \
     libhardware_legacy \
+    libincident \
     libinput \
     libinputflinger \
     libiprouteutil \