Disable most ART source modules when ART prebuilts are enabled.
After libdexfile_external was merged into libdexfile, libdexfile is an
APEX stub when prebuilts are enabled, and that cannot be used to build
libart and all the other internal modules that depend on it.
This CL:
- Changes art_defaults to disable native modules when building from
prebuilts. Some other modules that depends on them, like the
art-script sh_binary, also get disabled.
- Consolidates the makefile sections that are disabled when building
from prebuilts so that only a small bit is still enabled then.
- Temporarily removes the prebuilt for libctstiagent and activates its
source even when prebuilts are used, to work around sdk_version
problem (b/187288515).
- Removes explicit "enabled: true" in a couple of places that would
override the inherited flag that lets us disable them in builds from
prebuilts.
- Makes some Soong defaults available to libcore.
Test: m checkbuild
Test: art/build/build-art-module.sh --skip-apex
packages/modules/ArtPrebuilt/update-art-module-prebuilts.py \
--local-dist out/dist/ --skip-apex
m SOONG_CONFIG_art_module_source_build=false droid
m SOONG_CONFIG_art_module_source_build=false checkbuild
Change-Id: Ief60b933cd6273fc8b85fe7637b99ba1b78505f6
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index 847ad91..9e55f1a 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -17,8 +17,6 @@
# Build rules are excluded from Mac, since we can not run ART tests there in the first place.
ifneq ($(HOST_OS),darwin)
-ifeq (true,$(my_art_module_source_build))
-
LOCAL_PATH := $(call my-dir)
###################################################################################################
@@ -95,8 +93,6 @@
include $(CLEAR_VARS)
###################################################################################################
-endif # ifeq (true,$(my_art_module_source_build))
-
# The path for which all the dex files are relative, not actually the current directory.
LOCAL_PATH := art/test
@@ -361,15 +357,13 @@
com.android.art.testing \
com.android.conscrypt
endif
-ifeq (true,$(my_art_module_source_build))
- ifeq ($(ART_BUILD_HOST),true)
- $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),)))
- ifneq ($(HOST_PREFER_32_BIT),true)
- $(foreach file,$(2ND_ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),2ND_)))
- endif
- # Rules to run the different architecture versions of the gtest.
- $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host-both,$$(notdir $$(basename $$(file))))))
+ifeq ($(ART_BUILD_HOST),true)
+ $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),)))
+ ifneq ($(HOST_PREFER_32_BIT),true)
+ $(foreach file,$(2ND_ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),2ND_)))
endif
+ # Rules to run the different architecture versions of the gtest.
+ $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host-both,$$(notdir $$(basename $$(file))))))
endif
# Define all the combinations of host/target and suffix such as: