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

Commit 9429bf90 authored by Spandan Das's avatar Spandan Das
Browse files

Building mainline modules from source is now the default

RELEASE_APEX_CONTRIBUTIONS_* flags per module will be used to toggle
between sources and prebuilts of a mainline module in ap3a and above in
internal and partner builds.

Test: git_aosp-main-with-phones:aosp_cf_arm64_only_phone-next-userdebug
https://android-build.corp.google.com/builds/abtd/run/L61500030003577619

Test: lunch gsi_partner_arm-ap31-userdebug in v-aml-prebuilt-dev
Test: m out/soong/prebuil_info.json # identical before and after

Bug: 308188056
Change-Id: I308f071763297eb95ca5c8fb0191c8bb794789f7
parent 5a990562
Loading
Loading
Loading
Loading
+3 −23
Original line number Diff line number Diff line
@@ -38,27 +38,6 @@ $(call add_soong_config_var,ANDROID,TARGET_DYNAMIC_64_32_MEDIASERVER)
# PRODUCT_PRECOMPILED_SEPOLICY defaults to true. Explicitly check if it's "false" or not.
$(call add_soong_config_var_value,ANDROID,PRODUCT_PRECOMPILED_SEPOLICY,$(if $(filter false,$(PRODUCT_PRECOMPILED_SEPOLICY)),false,true))

# 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 := $(RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE)
# TODO(b/301454934): The value from build flag is set to empty when use `False`
# The condition below can be removed after the issue get sorted.
ifeq (,$(BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE))
  BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE := false
endif

ifneq (,$(MODULE_BUILD_FROM_SOURCE))
  # Keep an explicit setting.
else ifeq (,$(filter docs sdk win_sdk sdk_addon,$(MAKECMDGOALS)))
  MODULE_BUILD_FROM_SOURCE := true
else ifneq (,$(PRODUCT_MODULE_BUILD_FROM_SOURCE))
  # Let products override the branch default.
  MODULE_BUILD_FROM_SOURCE := $(PRODUCT_MODULE_BUILD_FROM_SOURCE)
else
  MODULE_BUILD_FROM_SOURCE := $(BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE)
endif

ifdef ART_DEBUG_OPT_FLAG
$(call soong_config_set,art_module,art_debug_opt_flag,$(ART_DEBUG_OPT_FLAG))
endif
@@ -76,9 +55,10 @@ $(call add_soong_config_var_value,ANDROID,library_linking_strategy,prefer_static
endif
endif

ifeq (true,$(MODULE_BUILD_FROM_SOURCE))
# TODO(b/308187800): some internal modules set `prefer` to true on the prebuilt apex module,
# and set that to false when `ANDROID.module_build_from_source` is true.
# Set this soong config variable to true for now, and cleanup `prefer` as part of b/308187800
$(call add_soong_config_var_value,ANDROID,module_build_from_source,true)
endif

# Messaging app vars
ifeq (eng,$(TARGET_BUILD_VARIANT))