summaryrefslogtreecommitdiffstats
path: root/core/executable.mk
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-02-06 14:45:37 -0800
committerColin Cross <ccross@android.com>2014-02-12 12:17:55 -0800
commit8e4041271dcee2aff001ac1f98527c5057415183 (patch)
tree9306b01d3d7e452af1f76d9da67725de9e5cedf8 /core/executable.mk
parentbec954d05e0eeec178c796d2332ee9a86becb5dc (diff)
downloadbuild-8e4041271dcee2aff001ac1f98527c5057415183.zip
build-8e4041271dcee2aff001ac1f98527c5057415183.tar.gz
build-8e4041271dcee2aff001ac1f98527c5057415183.tar.bz2
add support for module supported or unsupported target architectures
Add four new variables for module makefiles: LOCAL_MODULE_TARGET_ARCH specifies that a module is only supported for one or more architectures. Any architecture not in the list will be not attempt to build the module. The expected use case is prebuilts that are only suitable for a single architecture, or modules like llvm that need per-architecture support. LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH specifies that a module cannot be built for one or more architectures. LOCAL_MODULE_TARGET_ARCH_WARN and LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH_WARN are the same, but warn that the arch is not supported, which is useful for modules that are critical but not yet working. The logic for whether or not to build an architecture is fairly complicated, so this patch consolidates it into module_arch_supported.mk Change-Id: I120caf4a375f484e1fd6017b60c2f53882ae01e6
Diffstat (limited to 'core/executable.mk')
-rw-r--r--core/executable.mk21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/executable.mk b/core/executable.mk
index 65319ef..899a02f 100644
--- a/core/executable.mk
+++ b/core/executable.mk
@@ -9,13 +9,24 @@ LOCAL_32_BIT_ONLY := true
endif
endif
-ifeq ($(TARGET_IS_64_BIT)|$(LOCAL_32_BIT_ONLY),true|true)
+LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
+
+# check if primary arch is supported
+include $(BUILD_SYSTEM)/module_arch_supported.mk
+ifeq ($(my_module_arch_supported),true)
+# primary arch is supported
+include $(BUILD_SYSTEM)/executable_internal.mk
+else ifneq (,$(TARGET_2ND_ARCH))
+# check if secondary arch is supported
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
-else
-LOCAL_2ND_ARCH_VAR_PREFIX :=
+include $(BUILD_SYSTEM)/module_arch_supported.mk
+ifeq ($(my_module_arch_supported),true)
+# secondary arch is supported
+include $(BUILD_SYSTEM)/executable_internal.mk
endif
+endif # TARGET_2ND_ARCH
-LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
-include $(BUILD_SYSTEM)/executable_internal.mk
LOCAL_2ND_ARCH_VAR_PREFIX :=
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=
+
+my_module_arch_supported :=