Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31860f66 authored by Paul Duffin's avatar Paul Duffin Committed by Gerrit Code Review
Browse files

Merge "Prevent enabling prebuilts by default for builds that don't support them"

parents f43f6633 92345a1c
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -41,6 +41,37 @@ $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT)
# MODULE_BUILD_FROM_SOURCE.
BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := true

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

# 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.
else ifeq (,$(filter docs sdk win_sdk sdk_addon,$(MAKECMDGOALS))$(findstring com.google.android.conscrypt,$(PRODUCT_PACKAGES)))