From 2aed427c97d2eb65e685b76edeb3e09724b317be Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Tue, 19 Oct 2021 19:10:57 +0100 Subject: [PATCH] Remove UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true setting (reland). It needs to be controlled by build instead: - Prebuilt SDKs should be used for unbundled Mainline module builds, and is necessary on thin module branches to avoid dependencies on frameworks/base (e.g. framework-doc-stubs used by lint-check). - Source SDKs are needed on master which can otherwise get problems with out of date prebuilts (see e.g. b/140162931). This relands https://r.android.com/1862861 after (temporarily) overriding the flag to true in Mainline builds (cl/405889455), until b/204189791 is fixed. Test: env TARGET_BUILD_APPS=com.android.art \ packages/modules/common/build/build_unbundled_mainline_module.sh \ --product module_arm --dist_dir out/dist using the thin master-art manifest Bug: 202192894 Change-Id: I974be07cfcc5a02611b465cc402178985d8decd8 --- build/build_unbundled_mainline_module.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/build_unbundled_mainline_module.sh b/build/build_unbundled_mainline_module.sh index 3c7d78b..6c77592 100755 --- a/build/build_unbundled_mainline_module.sh +++ b/build/build_unbundled_mainline_module.sh @@ -118,8 +118,10 @@ function init() { # This script cannot handle compressed apexes declare -grx OVERRIDE_PRODUCT_COMPRESSED_APEX=false - # Unset to build using PreBuilt SDK. - declare -grx UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true + + # UNBUNDLED_BUILD_SDKS_FROM_SOURCE defaults to false, which is necessary to + # use prebuilt SDKs on thin branches that may not have the sources (e.g. + # frameworks/base). } function main() {