summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-05-23 17:45:37 +0000
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2023-05-25 16:50:39 +0000
commit593b2e5ce40f5814ebb71ddd9003a1b43799d274 (patch)
treead125359f6c02c2f2b200e2a2848b25b670659ea
parent6284936f20f564ced4989d7b35974d492859b3c9 (diff)
Create default PRODUCT_INCLUDE_TAGS in product_config
In the current setup in partner branch, we 1. Add blueprint_package_includes to prebuilts/module_sdk/* 2. Add the correct PRODUCT_INCLUDE_TAGS to partner_modules This means in those setups,none of the prebuilts are visible to aosp products since they they do not inherit partner_module makefiles. ``` e.g. prebuilts/module_sdk/art/current/Android.bp prebuilts/module_sdk/art/<go_specific>/current/Android.bp // aosp_arm cannot find either ``` To solve this, this CL creates a default inclusion tag for all products that do not set any PRODUCT_INCLUDE_TAGS explicitly. In the previous example, Soong analysis of aosp_* will use prebuilts/module_sdk/art/current/Android.bp. This should be a no-op for aosp and internal branches since none of the Android.bp files today contains blueprint_package_includes Test: m nothing for aosp_arm in the test branch of b/278604467#comment20 Test: m nothing for partner product that uses big android sdk Test: m nothing for partner product that uses go sdk Bug: 278604467 (cherry picked from https://android-review.googlesource.com/q/commit:2e69ea622877e7f88b82db4adbc284b9342f8c2c) Merged-In: I322b52c34ed339989207609dd0fd23c27ed1f697 Change-Id: I322b52c34ed339989207609dd0fd23c27ed1f697 cp required as per b/278604467#comment25
-rw-r--r--core/product_config.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/product_config.mk b/core/product_config.mk
index 1ef8890d46..5d76eebd1d 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -279,6 +279,15 @@ BLUEPRINT_INCLUDE_TAGS_ALLOWLIST := com.android.mainline_go com.android.mainline
$(foreach include_tag,$(PRODUCT_INCLUDE_TAGS), \
$(if $(filter $(include_tag),$(BLUEPRINT_INCLUDE_TAGS_ALLOWLIST)),,\
$(call pretty-error, $(include_tag) is not in BLUEPRINT_INCLUDE_TAGS_ALLOWLIST: $(BLUEPRINT_INCLUDE_TAGS_ALLOWLIST))))
+# Create default PRODUCT_INCLUDE_TAGS
+ifeq (, $(PRODUCT_INCLUDE_TAGS))
+# Soong analysis is global: even though a module might not be relevant to a specific product (e.g. build_tools for aosp_arm),
+# we still analyse it.
+# This means that in setups where we two have two prebuilts of module_sdk, we need a "default" to use in analysis
+# This should be a no-op in aosp and internal since no Android.bp file contains blueprint_package_includes
+PRODUCT_INCLUDE_TAGS += com.android.mainline # Use the big android one by default
+endif
+
#############################################################################
# Quick check and assign default values