summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2024-04-15 18:43:37 +0000
committer Spandan Das <spandandas@google.com> 2024-04-19 21:22:27 +0000
commit1df1ff5f6c8c06fd1f03b85761f774d086ac65c8 (patch)
tree52a40803d8cab13aed838040fcb1ec9d52248f77
parent30b1e9b7e08a68ed14f97d07ab626c79236b1ed2 (diff)
Delete disabling of art in non source builds
The soong modules in art/ are disabled by default when prebuilts are enabled. This was previously necessary (iiuc) to prevent art compiling its own source code using a potentially stale art module sdk. With trunk stable, the current plan is to compile java and cc with the source apis for `main` development. This means that we do not need to disable ART code when the prebuilt ART apex needs to be selected. In preparation for deprecating soong config namepsace based source vs prebuilt of mainline modules, delete this disabling mechanism. Test: In internal, modified trunk_staging.scl locally to select art.google.contributions.prebuilt Test: lunch cf_x86_64_phone-trunk_staging-userdebug; mmma art Test: git_master-art:art-host-x86_64,art-target-arm64,mainline_modules https://android-build.corp.google.com/builds/abtd/run/L30200030003163172 Test: git_master-art-host:art-build,art-gtest,art-test,art-preopt https://android-build.corp.google.com/builds/abtd/run/L07600030003164399 Bug: 315974566 Bug: 308188056 Change-Id: I8d9245385f8650c32f044a20199437ecbf5ab14f
-rw-r--r--Android.mk24
-rw-r--r--build/Android.bp39
-rw-r--r--build/Android.common_path.mk17
-rw-r--r--build/apex/Android.bp16
-rw-r--r--build/sdk/Android.bp24
-rw-r--r--test/Android.bp18
-rw-r--r--tools/Android.bp18
-rw-r--r--tools/cpp-define-generator/Android.bp12
8 files changed, 10 insertions, 158 deletions
diff --git a/Android.mk b/Android.mk
index e99ea575dc..87f6b84a53 100644
--- a/Android.mk
+++ b/Android.mk
@@ -67,8 +67,6 @@ LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
LOCAL_IS_HOST_MODULE := true
-ifeq (true,$(my_art_module_source_build))
-
LOCAL_REQUIRED_MODULES := \
ahat \
dexdump \
@@ -85,29 +83,9 @@ LOCAL_REQUIRED_MODULES += \
endif
-else
-
-# The developer tools available as prebuilts.
-LOCAL_REQUIRED_MODULES := \
- dexdump \
- oatdump \
-
-endif # ifeq (true,$(my_art_module_source_build))
-
include $(BUILD_PHONY_PACKAGE)
endif # HOST_OS != darwin
-
-########################################################################
-# Everything below is only available in ART source builds
-# (ART_MODULE_BUILD_FROM_SOURCE=true).
-########################################################################
-
-# TODO(b/172480617): Clean up the platform dependencies on everything above and
-# remove this condition.
-ifeq (true,$(my_art_module_source_build))
-
-
########################################################################
# product rules
@@ -832,5 +810,3 @@ public_sdk_stubs: $(STUB_ZIP_FILES)
MIN_SDK_VERSION :=
SDK_VERSIONS :=
-
-endif # ifeq (true,$(my_art_module_source_build))
diff --git a/build/Android.bp b/build/Android.bp
index a405df4cd1..7258ef71ea 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -94,16 +94,6 @@ art_module_art_global_defaults {
cpp_std: "gnu++17", // TODO(b/311052584): fix C++20 build and revert this line
- // Disable all ART Soong modules by default when ART prebuilts are in use.
- // TODO(b/172480617): Clean up when sources are gone from the platform tree
- // and we no longer need to support sources present when prebuilts are used.
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
// This is the default visibility for the //art package, but we repeat it
// here so that it gets merged with other visibility rules in modules
// extending these defaults.
@@ -382,7 +372,7 @@ java_library {
// from sources. TODO(b/172480617): Clean up when sources are gone from the
// platform tree and we no longer need to support sources present when prebuilts
// are used.
-
+// TODO(b/335854415): Remove the defaults module
art_module_cc_defaults {
name: "art_module_source_build_defaults",
defaults_visibility: [
@@ -390,12 +380,6 @@ art_module_cc_defaults {
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
target: {
windows: {
// Windows is disabled by default, but if we set enabled:true
@@ -405,6 +389,7 @@ art_module_cc_defaults {
},
}
+// TODO(b/335854415): Remove the defaults module
art_module_java_defaults {
name: "art_module_source_build_java_defaults",
defaults_visibility: [
@@ -412,12 +397,6 @@ art_module_java_defaults {
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
target: {
windows: {
enabled: false,
@@ -425,6 +404,7 @@ art_module_java_defaults {
},
}
+// TODO(b/335854415): Remove the defaults module
art_module_genrule_defaults {
name: "art_module_source_build_genrule_defaults",
defaults_visibility: [
@@ -432,12 +412,6 @@ art_module_genrule_defaults {
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
target: {
windows: {
enabled: false,
@@ -445,6 +419,7 @@ art_module_genrule_defaults {
},
}
+// TODO(b/335854415): Remove the defaults module
art_module_prebuilt_defaults {
name: "art_module_source_build_prebuilt_defaults",
defaults_visibility: [
@@ -452,12 +427,6 @@ art_module_prebuilt_defaults {
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
target: {
windows: {
enabled: false,
diff --git a/build/Android.common_path.mk b/build/Android.common_path.mk
index cfc60892ae..8a2829382f 100644
--- a/build/Android.common_path.mk
+++ b/build/Android.common_path.mk
@@ -17,21 +17,6 @@
ifndef ART_ANDROID_COMMON_PATH_MK
ART_ANDROID_COMMON_PATH_MK := true
-# We cannot build things that require host core images from prebuilts, because
-# they aren't present there. Set up a variable to skip all build rules that
-# relate to them, because `m checkbuild` complains on rules with nonexisting
-# dependencies, even if they won't get called.
-# TODO(b/172480617): Remove this when ART sources are no longer in platform manifests.
-ifeq (true,$(ART_MODULE_BUILD_FROM_SOURCE))
- my_art_module_source_build := true
-else ifeq (false,$(ART_MODULE_BUILD_FROM_SOURCE))
- my_art_module_source_build := false
-else
- $(error ART_MODULE_BUILD_FROM_SOURCE is neither true nor false - mk file ordering problem?)
-endif
-
-ifeq (true,$(my_art_module_source_build))
-
include art/build/Android.common.mk
include art/build/Android.common_build.mk
@@ -155,6 +140,4 @@ HOST_I18N_DATA := $(HOST_OUT)/$(I18N_APEX)/timestamp
# A phony file to create the tz data file for host.
HOST_TZDATA_DATA := $(HOST_OUT)/$(TZDATA_APEX)/timestamp
-endif # ifeq (true,$(my_art_module_source_build))
-
endif # ART_ANDROID_COMMON_PATH_MK
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 781940f70d..06dc586723 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -171,14 +171,6 @@ apex_key {
art_module_apex_defaults {
name: "com.android.art-base-defaults",
- // Enable if ART_MODULE_BUILD_FROM_SOURCE is true
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
target: {
windows: {
// When the Soong config variable above sets enabled:true, it
@@ -433,14 +425,6 @@ art_module_cc_defaults {
host_supported: true,
device_supported: false,
- // Enable if ART_MODULE_BUILD_FROM_SOURCE is true
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
target: {
darwin: {
enabled: false, // No python3.
diff --git a/build/sdk/Android.bp b/build/sdk/Android.bp
index 37296855f7..1db42aed04 100644
--- a/build/sdk/Android.bp
+++ b/build/sdk/Android.bp
@@ -43,14 +43,6 @@ art_module_sdk {
name: "art-module-sdk",
host_supported: true,
- // Enable if ART_MODULE_BUILD_FROM_SOURCE is true
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
prebuilt_visibility: prebuilt_visibility,
traits: {
@@ -152,14 +144,6 @@ art_module_exports {
name: "art-module-host-exports",
host_supported: true,
- // Enable if ART_MODULE_BUILD_FROM_SOURCE is true
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
prebuilt_visibility: prebuilt_visibility,
target: {
@@ -207,14 +191,6 @@ art_module_exports {
art_module_exports {
name: "art-module-test-exports",
- // Enable if ART_MODULE_BUILD_FROM_SOURCE is true
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
prebuilt_visibility: prebuilt_visibility,
java_libs: [
diff --git a/test/Android.bp b/test/Android.bp
index bc71245b9b..c3f781cc4c 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -73,18 +73,6 @@ art_module_cc_defaults {
"art_test_common_defaults",
],
host_supported: true,
- soong_config_variables: {
- source_build: {
- target: {
- android: {
- test_for: [
- "com.android.art",
- "com.android.art.debug",
- ],
- },
- },
- },
- },
target: {
// The following set of relative_install_paths installs the library in a
// location that will be available as java.library.path in run tests.
@@ -103,6 +91,12 @@ art_module_cc_defaults {
android_x86_64: {
relative_install_path: "art/x86_64",
},
+ android: {
+ test_for: [
+ "com.android.art",
+ "com.android.art.debug",
+ ],
+ },
},
// Tests aren't generally included in any APEX, but this is necessary to
// avoid duplicate install rules for them by making them unavailable to platform.
diff --git a/tools/Android.bp b/tools/Android.bp
index 5cc579cc2f..ae7c5dd0c6 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -59,17 +59,6 @@ cc_binary {
art_module_sh_binary {
name: "art-script",
- // Disable this script in prebuilt mode since it depends on dalvikvm which
- // isn't a prebuilt.
- // TODO(b/172480617): Clean up when sources are gone from the platform tree
- // and we no longer need to support sources present when prebuilts are used.
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
host_supported: true,
src: "art",
filename_from_src: true,
@@ -119,13 +108,6 @@ sh_binary {
art_module_cc_genrule {
name: "check_cfi",
- // disable the target when prebuilt modules are used
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
tool_files: [
"check_cfi.py",
],
diff --git a/tools/cpp-define-generator/Android.bp b/tools/cpp-define-generator/Android.bp
index 6e8cd339c8..e374ed8857 100644
--- a/tools/cpp-define-generator/Android.bp
+++ b/tools/cpp-define-generator/Android.bp
@@ -54,18 +54,6 @@ soong_config_module_type_import {
// This extracts the compile-time constants from asm_defines.s and creates the header.
art_module_cc_genrule {
name: "cpp-define-generator-asm-support",
-
- // :asm_defines.s is only available when building ART from source, so do the
- // same here.
- // TODO(b/172480617): Clean up when sources are gone from the platform tree
- // and we no longer need to support sources present when prebuilts are used.
- enabled: false,
- soong_config_variables: {
- source_build: {
- enabled: true,
- },
- },
-
host_supported: true,
device_supported: true,
srcs: [":asm_defines.s"],