diff options
author | 2021-05-10 17:44:05 +0100 | |
---|---|---|
committer | 2021-05-19 14:31:13 +0000 | |
commit | 1dc77abf87d303a8f4aa35148c57f7ab20832222 (patch) | |
tree | 61f4aae7377072ad2a1f24e62043b86a6f49954c | |
parent | 496b9b43c987a2d769d0c178ee1d88cd92da84d9 (diff) |
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
-rw-r--r-- | Android.mk | 103 | ||||
-rw-r--r-- | build/Android.bp | 38 | ||||
-rw-r--r-- | build/Android.common_path.mk | 8 | ||||
-rw-r--r-- | build/Android.gtest.mk | 18 | ||||
-rw-r--r-- | build/SoongConfig.bp | 24 | ||||
-rw-r--r-- | build/sdk/Android.bp | 5 | ||||
-rw-r--r-- | dexdump/Android.bp | 1 | ||||
-rw-r--r-- | libdexfile/Android.bp | 7 | ||||
-rw-r--r-- | libnativeloader/Android.bp | 5 | ||||
-rw-r--r-- | odrefresh/Android.bp | 3 | ||||
-rw-r--r-- | test/Android.bp | 8 | ||||
-rw-r--r-- | test/Android.run-test.mk | 17 | ||||
-rw-r--r-- | tools/Android.bp | 28 | ||||
-rw-r--r-- | tools/ahat/Android.mk | 2 | ||||
-rw-r--r-- | tools/cpp-define-generator/Android.bp | 28 | ||||
-rw-r--r-- | tools/dexfuzz/Android.mk | 6 | ||||
-rw-r--r-- | tools/veridex/Android.mk | 2 |
17 files changed, 204 insertions, 99 deletions
diff --git a/Android.mk b/Android.mk index 3bdcc5f106..4889d346af 100644 --- a/Android.mk +++ b/Android.mk @@ -18,6 +18,8 @@ LOCAL_PATH := $(call my-dir) art_path := $(LOCAL_PATH) +include $(art_path)/tools/veridex/Android.mk + ######################################################################## # clean-oat rules # @@ -54,12 +56,64 @@ endif include $(art_path)/build/Android.cpplint.mk ######################################################################## +# The art-tools package depends on helpers and tools that are useful for developers. Similar +# dependencies exist for the APEX builds for these tools (see build/apex/Android.bp). + +ifneq ($(HOST_OS),darwin) +include $(CLEAR_VARS) +LOCAL_MODULE := art-tools +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 +LOCAL_LICENSE_CONDITIONS := notice restricted +LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE +LOCAL_IS_HOST_MODULE := true + +ifeq (true,$(my_art_module_source_build)) + +LOCAL_REQUIRED_MODULES := \ + ahat \ + dexdump \ + hprof-conv \ + +# A subset of the tools are disabled when HOST_PREFER_32_BIT is defined as make reports that +# they are not supported on host (b/129323791). This is likely due to art_apex disabling host +# APEX builds when HOST_PREFER_32_BIT is set (b/120617876). +ifneq ($(HOST_PREFER_32_BIT),true) +LOCAL_REQUIRED_MODULES += \ + dexdiag \ + dexlist \ + oatdump \ + +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 +# (SOONG_CONFIG_art_module_source_build=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 include $(art_path)/oatdump/Android.mk include $(art_path)/tools/ahat/Android.mk include $(art_path)/tools/dexfuzz/Android.mk -include $(art_path)/tools/veridex/Android.mk ART_HOST_DEPENDENCIES := \ $(ART_HOST_EXECUTABLES) \ @@ -112,8 +166,6 @@ test-art-run-test: ######################################################################## # host test rules -ifeq (true,$(my_art_module_source_build)) - test-art: test-art-host test-art-gtest: test-art-host-gtest test-art-run-test: test-art-host-run-test @@ -207,8 +259,6 @@ endif test-art-host-dexdump: $(addprefix $(HOST_OUT_EXECUTABLES)/, dexdump dexlist) ANDROID_HOST_OUT=$(realpath $(HOST_OUT)) art/test/dexdump/run-all-tests -endif # ifeq (true,$(my_art_module_source_build)) - ######################################################################## # target test rules @@ -400,35 +450,6 @@ art_module_debug_lib := include $(BUILD_PHONY_PACKAGE) -# The art-tools package depends on helpers and tools that are useful for developers. Similar -# dependencies exist for the APEX builds for these tools (see build/apex/Android.bp). - -ifneq ($(HOST_OS),darwin) -include $(CLEAR_VARS) -LOCAL_MODULE := art-tools -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 -LOCAL_LICENSE_CONDITIONS := notice restricted -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE -LOCAL_IS_HOST_MODULE := true -LOCAL_REQUIRED_MODULES := \ - ahat \ - dexdump \ - hprof-conv \ - -# A subset of the tools are disabled when HOST_PREFER_32_BIT is defined as make reports that -# they are not supported on host (b/129323791). This is likely due to art_apex disabling host -# APEX builds when HOST_PREFER_32_BIT is set (b/120617876). -ifneq ($(HOST_PREFER_32_BIT),true) -LOCAL_REQUIRED_MODULES += \ - dexdiag \ - dexlist \ - oatdump \ - -endif - -include $(BUILD_PHONY_PACKAGE) -endif # HOST_OS != darwin - #################################################################################################### # Fake packages to ensure generation of libopenjdkd when one builds with mm/mmm/mmma. # @@ -458,8 +479,6 @@ endif # HOST_OS != darwin # "m build-art" for quick minimal build .PHONY: build-art -ifeq (true,$(my_art_module_source_build)) - build-art: build-art-host # For host, we extract the ICU data from the apex and install it to HOST_OUT/I18N_APEX. @@ -480,8 +499,6 @@ $(HOST_TZDATA_DATA): $(TARGET_OUT)/apex/$(TZDATA_APEX).apex $(HOST_OUT)/bin/deap .PHONY: build-art-host build-art-host: $(HOST_OUT_EXECUTABLES)/art $(ART_HOST_DEPENDENCIES) $(HOST_CORE_IMG_OUTS) $(HOST_I18N_DATA) $(HOST_TZDATA_DATA) -endif # ifeq (true,$(my_art_module_source_build)) - build-art: build-art-target .PHONY: build-art-target @@ -709,8 +726,6 @@ build-art-target-golem: $(RELEASE_ART_APEX) com.android.runtime $(CONSCRYPT_APEX ######################################################################## # Phony target for building what go/lem requires on host. -ifeq (true,$(my_art_module_source_build)) - .PHONY: build-art-host-golem # Also include libartbenchmark, we always include it when running golem. ART_HOST_SHARED_LIBRARY_BENCHMARK := $(ART_HOST_OUT_SHARED_LIBRARIES)/libartbenchmark.so @@ -718,8 +733,6 @@ build-art-host-golem: build-art-host \ $(ART_HOST_SHARED_LIBRARY_BENCHMARK) \ $(HOST_OUT_EXECUTABLES)/dex2oat_wrapper -endif # ifeq (true,$(my_art_module_source_build)) - ######################################################################## # Phony target for building what go/lem requires for syncing /system to target. .PHONY: build-art-unbundled-golem @@ -729,13 +742,9 @@ build-art-unbundled-golem: art-runtime linker oatdump $(art_apex_jars) conscrypt ######################################################################## # Rules for building all dependencies for tests. -ifeq (true,$(my_art_module_source_build)) - .PHONY: build-art-host-tests build-art-host-tests: build-art-host $(TEST_ART_RUN_TEST_DEPENDENCIES) $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(ART_TEST_HOST_GTEST_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES) -endif # ifeq (true,$(my_art_module_source_build)) - .PHONY: build-art-target-tests build-art-target-tests: build-art-target $(TEST_ART_RUN_TEST_DEPENDENCIES) $(ART_TEST_TARGET_RUN_TEST_DEPENDENCIES) $(ART_TEST_TARGET_GTEST_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES) @@ -902,3 +911,5 @@ 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 8a54194881..21858db130 100644 --- a/build/Android.bp +++ b/build/Android.bp @@ -63,11 +63,30 @@ art_clang_tidy_disabled = [ "-modernize-pass-by-value", ] -art_global_defaults { +soong_config_module_type_import { + from: "art/build/SoongConfig.bp", + module_types: [ + "art_module_art_global_defaults", + "art_module_cc_defaults", + "art_module_java_defaults", + ], +} + +art_module_art_global_defaults { // Additional flags are computed by art.go name: "art_defaults", + // 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. @@ -180,6 +199,13 @@ art_global_defaults { darwin: { enabled: false, }, + windows: { + // When the module is enabled globally in the soong_config_variables + // stanza above, it may get enabled on windows too for some module + // types. Hence we need to disable it explicitly. + // TODO(b/172480617): Clean up with that. + enabled: false, + }, host: { cflags: [ // Bug: 15446488. We don't omit the frame pointer to work around @@ -303,14 +329,6 @@ art_debug_defaults { min_sdk_version: "S", } -soong_config_module_type_import { - from: "art/build/SoongConfig.bp", - module_types: [ - "art_module_cc_defaults", - "art_module_java_defaults", - ], -} - // Use this to enable a cc_* module only when building ART 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. @@ -318,6 +336,7 @@ art_module_cc_defaults { name: "art_module_source_build_defaults", defaults_visibility: [ "//art:__subpackages__", + "//libcore:__subpackages__", "//libnativehelper:__subpackages__", ], @@ -343,6 +362,7 @@ art_module_java_defaults { name: "art_module_source_build_java_defaults", defaults_visibility: [ "//art:__subpackages__", + "//libcore:__subpackages__", "//libnativehelper:__subpackages__", ], diff --git a/build/Android.common_path.mk b/build/Android.common_path.mk index d48551826d..c6f4819892 100644 --- a/build/Android.common_path.mk +++ b/build/Android.common_path.mk @@ -30,6 +30,8 @@ else $(error SOONG_CONFIG_art_module_source_build 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 @@ -61,8 +63,6 @@ endif HOST_CORE_IMG_DEX_FILES := $(foreach jar,$(HOST_CORE_IMG_JARS), $(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),t,COMMON)/javalib.jar) TARGET_CORE_IMG_DEX_FILES := $(foreach jar,$(TARGET_CORE_IMG_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar).com.android.art.testing, ,COMMON)/javalib.jar) -ifeq (true,$(my_art_module_source_build)) - # Also copy the jar files next to host boot.art image. HOST_BOOT_IMAGE_JARS := $(foreach jar,$(CORE_IMG_JARS),$(HOST_OUT)/apex/com.android.art/javalib/$(jar).jar) $(HOST_BOOT_IMAGE_JARS): $(HOST_OUT)/apex/com.android.art/javalib/%.jar : $(HOST_OUT_JAVA_LIBRARIES)/%-hostdex.jar @@ -75,8 +75,6 @@ HOST_BOOT_IMAGE_JARS += $(HOST_OUT)/apex/com.android.i18n/javalib/core-icu4j.jar $(HOST_OUT)/apex/com.android.i18n/javalib/core-icu4j.jar : $(HOST_OUT_JAVA_LIBRARIES)/core-icu4j-hostdex.jar $(copy-file-to-target) -endif # ifeq (true,$(my_art_module_source_build)) - HOST_CORE_IMG_OUTS += $(HOST_BOOT_IMAGE_JARS) $(HOST_BOOT_IMAGE) $(2ND_HOST_BOOT_IMAGE) HOST_TEST_CORE_JARS := $(addsuffix -hostdex,$(CORE_IMG_JARS) core-icu4j conscrypt) @@ -150,4 +148,6 @@ 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/Android.gtest.mk b/build/Android.gtest.mk index 847ad911e7..9e55f1afd6 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 @@ $(LOCAL_BUILT_MODULE): 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 @@ ifeq ($(ART_BUILD_TARGET),true) 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: diff --git a/build/SoongConfig.bp b/build/SoongConfig.bp index 38c0d97d3b..3e2d8fce38 100644 --- a/build/SoongConfig.bp +++ b/build/SoongConfig.bp @@ -11,6 +11,14 @@ soong_config_bool_variable { } soong_config_module_type { + name: "art_module_art_global_defaults", + module_type: "art_global_defaults", + config_namespace: "art_module", + bool_variables: ["source_build"], + properties: ["enabled"], +} + +soong_config_module_type { name: "art_module_apex_defaults", module_type: "apex_defaults", config_namespace: "art_module", @@ -30,6 +38,14 @@ soong_config_module_type { } soong_config_module_type { + name: "art_module_cc_genrule", + module_type: "cc_genrule", + config_namespace: "art_module", + bool_variables: ["source_build"], + properties: ["enabled"], +} + +soong_config_module_type { name: "art_module_exports", module_type: "module_exports", config_namespace: "art_module", @@ -60,3 +76,11 @@ soong_config_module_type { bool_variables: ["source_build"], properties: ["enabled"], } + +soong_config_module_type { + name: "art_module_sh_binary", + module_type: "sh_binary", + config_namespace: "art_module", + bool_variables: ["source_build"], + properties: ["enabled"], +} diff --git a/build/sdk/Android.bp b/build/sdk/Android.bp index f6b37e7626..35fd017ba0 100644 --- a/build/sdk/Android.bp +++ b/build/sdk/Android.bp @@ -263,6 +263,9 @@ art_module_exports { "libjavacoretests", ], native_static_libs: [ - "libctstiagent", + // TODO(b/187288515): Providing this as a prebuilt introduces an issue + // with sdk_version propagation. Temporarily use the source library + // instead. + //"libctstiagent", ], } diff --git a/dexdump/Android.bp b/dexdump/Android.bp index 87abfc1fbc..eb33b26651 100644 --- a/dexdump/Android.bp +++ b/dexdump/Android.bp @@ -46,7 +46,6 @@ art_cc_binary { // Use static libs on host: required for Windows build and // static_sdk_tools build. host: { - enabled: true, stl: "libc++_static", static_libs: [ "libdexfile", diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp index 1a3c7bd50b..b8cdd8bd29 100644 --- a/libdexfile/Android.bp +++ b/libdexfile/Android.bp @@ -330,7 +330,10 @@ cc_library_headers { art_cc_test { name: "art_libdexfile_external_tests", - defaults: ["art_test_defaults"], + defaults: [ + "art_module_source_build_defaults", + "art_test_defaults", + ], test_suites: ["general-tests"], srcs: [ "external/dex_file_ext_c_test.c", @@ -382,6 +385,7 @@ art_cc_library { art_cc_test { name: "art_libdexfile_support_tests", defaults: [ + "art_module_source_build_defaults", "art_test_defaults", ], host_supported: true, @@ -434,6 +438,7 @@ art_cc_test { name: "art_libdexfile_support_static_tests", test_suites: ["general-tests"], defaults: [ + "art_module_source_build_defaults", "art_test_defaults", "libdexfile_support_static_defaults", ], diff --git a/libnativeloader/Android.bp b/libnativeloader/Android.bp index 2cc6b80787..8b8fb27427 100644 --- a/libnativeloader/Android.bp +++ b/libnativeloader/Android.bp @@ -118,7 +118,10 @@ cc_library_headers { art_cc_test { name: "libnativeloader_test", - defaults: ["art_test_defaults"], + defaults: [ + "art_module_source_build_defaults", + "art_test_defaults", + ], host_supported: false, srcs: [ diff --git a/odrefresh/Android.bp b/odrefresh/Android.bp index e504064274..10845c5666 100644 --- a/odrefresh/Android.bp +++ b/odrefresh/Android.bp @@ -52,9 +52,6 @@ cc_defaults { // Use the 32-bit version of odrefresh on devices. compile_multilib: "prefer32", }, - linux: { - enabled: true, - }, host: { shared_libs: [ // Both these libraries for libxml2 on host for code derived from apex-info-list. diff --git a/test/Android.bp b/test/Android.bp index ec96ce60a6..82027a75dc 100644 --- a/test/Android.bp +++ b/test/Android.bp @@ -560,6 +560,14 @@ art_cc_test_library { cc_library_static { name: "libctstiagent", defaults: ["libtiagent-base-defaults"], + + // TODO(b/187288515): Providing this as a prebuilt introduces an issue with + // sdk_version propagation. Temporarily use the source library instead, + // which means we need to override the logic inherited from art_defaults and + // art_test_internal_library_defaults that disables sources when not + // building ART from sources. + enabled: true, + visibility: [ "//cts/hostsidetests/jvmti:__subpackages__", ], diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk index 5480860c6f..8b5aae484c 100644 --- a/test/Android.run-test.mk +++ b/test/Android.run-test.mk @@ -94,13 +94,11 @@ ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \ endif -ifeq (true,$(my_art_module_source_build)) - test-art-host-run-test-dependencies : \ - $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(TEST_ART_RUN_TEST_DEPENDENCIES) \ - $(HOST_BOOT_IMAGE_JARS) $(HOST_BOOT_IMAGE) $(2ND_HOST_BOOT_IMAGE) - .PHONY: test-art-host-run-test-dependencies - test-art-run-test-dependencies : test-art-host-run-test-dependencies -endif +test-art-host-run-test-dependencies : \ + $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(TEST_ART_RUN_TEST_DEPENDENCIES) \ + $(HOST_BOOT_IMAGE_JARS) $(HOST_BOOT_IMAGE) $(2ND_HOST_BOOT_IMAGE) +.PHONY: test-art-host-run-test-dependencies +test-art-run-test-dependencies : test-art-host-run-test-dependencies test-art-target-run-test-dependencies : .PHONY: test-art-target-run-test-dependencies @@ -123,10 +121,7 @@ define define-test-art-host-or-target-run-test-group endef # define-test-art-host-or-target-run-test-group $(eval $(call define-test-art-host-or-target-run-test-group,target)) - -ifeq (true,$(my_art_module_source_build)) - $(eval $(call define-test-art-host-or-target-run-test-group,host)) -endif +$(eval $(call define-test-art-host-or-target-run-test-group,host)) define-test-art-host-or-target-run-test-group := LOCAL_PATH := diff --git a/tools/Android.bp b/tools/Android.bp index c154dc8125..9b9d3a765d 100644 --- a/tools/Android.bp +++ b/tools/Android.bp @@ -38,9 +38,28 @@ python_binary_host { }, } +soong_config_module_type_import { + from: "art/build/SoongConfig.bp", + module_types: [ + "art_module_sh_binary", + ], +} + // Copy the art shell script to the host and target's bin directory -sh_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, @@ -57,6 +76,13 @@ sh_binary { darwin: { enabled: false, }, + windows: { + // When the module is enabled globally in the soong_config_variables + // stanza above, it gets enabled on windows too. Hence we need to + // disable it explicitly. + // TODO(b/172480617): Clean up with that. + enabled: false, + }, }, } diff --git a/tools/ahat/Android.mk b/tools/ahat/Android.mk index 014e24e8a3..16f171243c 100644 --- a/tools/ahat/Android.mk +++ b/tools/ahat/Android.mk @@ -22,7 +22,6 @@ include art/build/Android.common_path.mk # doesn't run on darwin. Only build and run the tests for linux. # There are also issues with running under instrumentation. ifeq ($(HOST_OS),linux) -ifeq (true,$(my_art_module_source_build)) ifneq ($(EMMA_INSTRUMENT),true) # Determine the location of the test-dump.jar, test-dump.hprof, and proguard @@ -123,7 +122,6 @@ include $(BUILD_HOST_JAVA_LIBRARY) AHAT_TEST_JAR := $(LOCAL_BUILT_MODULE) endif # EMMA_INSTRUMENT -endif # my_art_module_source_build endif # linux # Clean up local variables. diff --git a/tools/cpp-define-generator/Android.bp b/tools/cpp-define-generator/Android.bp index 5c9e4f95f3..a436430c16 100644 --- a/tools/cpp-define-generator/Android.bp +++ b/tools/cpp-define-generator/Android.bp @@ -55,9 +55,28 @@ cc_object { ], } +soong_config_module_type_import { + from: "art/build/SoongConfig.bp", + module_types: [ + "art_module_cc_genrule", + ], +} + // This extracts the compile-time constants from asm_defines.s and creates the header. -cc_genrule { +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"], @@ -68,6 +87,13 @@ cc_genrule { darwin: { enabled: false, }, + windows: { + // When the module is enabled globally in the soong_config_variables + // stanza above, it gets enabled on windows too. Hence we need to + // disable it explicitly. + // TODO(b/172480617): Clean up with that. + enabled: false, + }, }, apex_available: [ diff --git a/tools/dexfuzz/Android.mk b/tools/dexfuzz/Android.mk index 689484153b..929b687da3 100644 --- a/tools/dexfuzz/Android.mk +++ b/tools/dexfuzz/Android.mk @@ -19,10 +19,4 @@ LOCAL_PATH := $(call my-dir) # --- dexfuzz script with core image dependencies ---------------- .PHONY: fuzzer -# We cannot depend on host core image files from prebuilts. -# TODO(b/172480617): Remove this when ART sources are no longer in platform manifests. -ifeq (true,$(SOONG_CONFIG_art_module_source_build)) - fuzzer: dexfuzz-script $(HOST_CORE_IMG_OUTS) - -endif diff --git a/tools/veridex/Android.mk b/tools/veridex/Android.mk index c510a5174e..a298af4dcc 100644 --- a/tools/veridex/Android.mk +++ b/tools/veridex/Android.mk @@ -14,6 +14,8 @@ # limitations under the License. # +# TODO(b/172480617): Clean up the platform dependencies on this. + LOCAL_PATH := $(call my-dir) # The veridex tool takes stub dex files as input, so we generate both the system and oahl |