diff options
author | Dario Freni <dariofreni@google.com> | 2022-03-29 15:21:41 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2022-05-23 18:42:27 +0000 |
commit | c7b5e2c0cea30dd084536bdc68dffdfb1c50073d (patch) | |
tree | fc74bbead845beb675af1b061686204d0f8f0b7b | |
parent | 525d7a8a143c0cd5c800fcf7cd74e8758ffd4ad3 (diff) | |
download | build-c7b5e2c0cea30dd084536bdc68dffdfb1c50073d.tar.gz |
Retry: Enable mainline prebuilts on tm-dev branch.
Except for santizer and framework Java coverage tests as they require
specialized prebuilts built from a matching configuration and we do not
provide them.
And products that use dex2oat(d)s as they are not available as a
prebuilt.
And products that cross compile to arm64 and linux_bionic on the host
as prebuilts for that are not available.
And atv/tv products as they break when building against prebuilts.
Bug: 230478310
Bug: 223592962
Test: presubmit
Merged-In: I3ed091156c4b39dad6eaf578144ac3d070025988
Merged-In: I9731400acfade95b3eab8f2d99fddb4cf856aa91
Merged-In: I43fa4ae8db51012eaf78d70fe65e9e0a3f7eca16
Change-Id: Ib01ba9e2e3c2225c88d52b6811edf04aff02c81e
-rw-r--r-- | core/android_soong_config_vars.mk | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index 329847fbbd..a6116f215b 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -39,7 +39,45 @@ $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT) # Default behavior for the tree wrt building modules or using prebuilts. This # can always be overridden by setting the environment variable # MODULE_BUILD_FROM_SOURCE. -BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := false + +ifneq ($(SANITIZE_TARGET)$(EMMA_INSTRUMENT_FRAMEWORK),) + # Always use sources when building the framework with Java coverage or + # sanitized builds as they both require purpose built prebuilts which we do + # not provide. + BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +endif + +# TODO(b/172063604): Remove once products no longer use dex2oat(d)s. +# If the product uses dex2oats and/or dex2oatds then build from sources as +# ART does not currently provide prebuilts of those tools. +ifneq (,$(filter dex2oats dex2oatds,$(PRODUCT_HOST_PACKAGES))) + BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +endif + +# ART does not provide linux_bionic variants needed for products that +# set HOST_CROSS_OS=linux_bionic. +ifeq (linux_bionic,${HOST_CROSS_OS}) + BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +endif + +# ART does not provide host side arm64 variants needed for products that +# set HOST_CROSS_ARCH=arm64. +ifeq (arm64,${HOST_CROSS_ARCH}) + BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +endif + +# TV based devices do not seem to work with prebuilts, so build from source +# for now and fix in a follow up. +ifneq (,$(filter tv,$(subst $(comma),$(space),${PRODUCT_CHARACTERISTICS}))) + BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +endif + +# ATV based devices do not seem to work with prebuilts, so build from source +# for now and fix in a follow up. +ifneq (,${PRODUCT_IS_ATV}) + BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true +endif ifneq (,$(MODULE_BUILD_FROM_SOURCE)) # Keep an explicit setting. |