8e4041271d
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
21 lines
663 B
Makefile
21 lines
663 B
Makefile
# We don't automatically set up rules to build executables for both
|
|
# TARGET_ARCH and TARGET_2ND_ARCH.
|
|
# By default, an executable is built for TARGET_ARCH.
|
|
# To build it for TARGET_2ND_ARCH in a 64bit product, use "LOCAL_32_BIT_ONLY := true".
|
|
|
|
ifeq ($(TARGET_PREFER_32_BIT),true)
|
|
ifneq ($(LOCAL_NO_2ND_ARCH),true)
|
|
LOCAL_32_BIT_ONLY := true
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(TARGET_IS_64_BIT)|$(LOCAL_32_BIT_ONLY),true|true)
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
|
|
else
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
|
endif
|
|
|
|
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX := true
|
|
include $(BUILD_SYSTEM)/executable_internal.mk
|
|
LOCAL_2ND_ARCH_VAR_PREFIX :=
|
|
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=
|