Tell Soong about HOST_CROSS_*

This configures Soong to build windows binaries, which requires support
for 64-bit windows binaries in BUILD_PREBUILT for USE_SOONG=true.

module_arch_supported.mk did not support 64-bit being the secondary
architecture when evaluating multilib conditionals. All other uses of
HOST_*_IS_64_BIT already check the proper version.

(cherry picked from commit d6e3b84185)

Change-Id: I99cb69ea1756b8258f15d3630c75c9ffe277aaef
This commit is contained in:
Dan Willemsen 2016-02-09 14:55:13 -08:00 committed by Stephen Hines
parent 6f82901188
commit fe7f737103
3 changed files with 33 additions and 10 deletions

View File

@ -12,7 +12,7 @@
## LOCAL_MODULE_HOST_OS
##
## Inputs from build system:
## $(my_prefix)IS_64_BIT
## $(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT
## LOCAL_2ND_ARCH_VAR_PREFIX
##
## Outputs:
@ -25,19 +25,18 @@ ifeq ($(my_module_multilib),none)
my_module_arch_supported := false
endif
ifeq ($(LOCAL_2ND_ARCH_VAR_PREFIX),)
ifeq ($($(my_prefix)IS_64_BIT)|$(my_module_multilib),true|32)
my_module_arch_supported := false
else ifeq ($($(my_prefix)IS_64_BIT)|$(my_module_multilib),|64)
ifeq ($($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT)|$(my_module_multilib),true|32)
my_module_arch_supported := false
endif
else # LOCAL_2ND_ARCH_VAR_PREFIX
ifeq ($($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT)|$(my_module_multilib),|64)
my_module_arch_supported := false
endif
ifneq ($(LOCAL_2ND_ARCH_VAR_PREFIX),)
ifeq ($(my_module_multilib),first)
my_module_arch_supported := false
else ifeq ($(my_module_multilib),64)
my_module_arch_supported := false
endif
endif # LOCAL_2ND_ARCH_VAR_PREFIX
endif
ifneq (,$(LOCAL_MODULE_$(my_prefix)ARCH))
ifeq (,$(filter $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH),$(LOCAL_MODULE_$(my_prefix)ARCH)))

View File

@ -72,6 +72,26 @@ include $(BUILD_SYSTEM)/prebuilt_internal.mk
endif
LOCAL_HOST_PREFIX :=
endif
ifdef HOST_CROSS_2ND_ARCH
my_prefix := HOST_CROSS_
LOCAL_2ND_ARCH_VAR_PREFIX := $($(my_prefix)2ND_ARCH_VAR_PREFIX)
LOCAL_HOST_PREFIX := $(my_prefix)
include $(BUILD_SYSTEM)/module_arch_supported.mk
ifeq ($(my_module_arch_supported),true)
$(warning $(LOCAL_MODULE) $(LOCAL_2ND_ARCH_VAR_PREFIX))
OVERRIDE_BUILT_MODULE_PATH :=
LOCAL_BUILT_MODULE :=
LOCAL_INSTALLED_MODULE :=
LOCAL_MODULE_STEM :=
LOCAL_BUILT_MODULE_STEM :=
LOCAL_INSTALLED_MODULE_STEM :=
LOCAL_INTERMEDIATE_TARGETS :=
include $(BUILD_SYSTEM)/prebuilt_internal.mk
endif
LOCAL_HOST_PREFIX :=
LOCAL_2ND_ARCH_VAR_PREFIX :=
endif
endif
endif

View File

@ -45,7 +45,11 @@ $(SOONG_VARIABLES): FORCE
echo ' "DeviceSecondaryAbi": ["$(TARGET_2ND_CPU_ABI)", "$(TARGET_2ND_CPU_ABI2)"],'; \
echo ''; \
echo ' "HostArch": "$(HOST_ARCH)",'; \
echo ' "HostSecondaryArch": "$(HOST_2ND_ARCH)"'; \
echo ' "HostSecondaryArch": "$(HOST_2ND_ARCH)",'; \
echo ''; \
echo ' "CrossHost": "$(HOST_CROSS_OS)",'; \
echo ' "CrossHostArch": "$(HOST_CROSS_ARCH)",'; \
echo ' "CrossHostSecondaryArch": "$(HOST_CROSS_2ND_ARCH)"'; \
echo '}') > $(SOONG_VARIABLES_TMP); \
if ! cmp -s $(SOONG_VARIABLES_TMP) $(SOONG_VARIABLES); then \
mv $(SOONG_VARIABLES_TMP) $(SOONG_VARIABLES); \