summaryrefslogtreecommitdiff
path: root/tools/cpp-define-generator/Android.bp
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2021-05-10 17:44:05 +0100
committer Martin Stjernholm <mast@google.com> 2021-05-19 14:31:13 +0000
commit1dc77abf87d303a8f4aa35148c57f7ab20832222 (patch)
tree61f4aae7377072ad2a1f24e62043b86a6f49954c /tools/cpp-define-generator/Android.bp
parent496b9b43c987a2d769d0c178ee1d88cd92da84d9 (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
Diffstat (limited to 'tools/cpp-define-generator/Android.bp')
-rw-r--r--tools/cpp-define-generator/Android.bp28
1 files changed, 27 insertions, 1 deletions
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: [