forked from openkylin/platform_build
Better error for missing LOCAL_SRC_FILES in prebuilts
If there's a prebuilt with LOCAL_MULTILIB := true, but only a single LOCAL_SRC_FILES entry, we end up with a weird build error where `cp` is trying to copy the local directory. Exit early with an error in this case. Bug: 73904572 Test: build-aosp_marlin.ninja is identical Change-Id: Ie2821817c237087a96e87fb9602e430e0f86584a
This commit is contained in:
parent
063e6b2939
commit
8d5dc6be57
|
@ -20,19 +20,19 @@ my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT)
|
|||
|
||||
ifdef LOCAL_PREBUILT_MODULE_FILE
|
||||
my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE)
|
||||
else ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
||||
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
|
||||
LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) :=
|
||||
else ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix)
|
||||
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix))
|
||||
LOCAL_SRC_FILES_$(my_32_64_bit_suffix) :=
|
||||
else ifdef LOCAL_SRC_FILES
|
||||
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
|
||||
LOCAL_SRC_FILES :=
|
||||
else ifdef LOCAL_REPLACE_PREBUILT_APK_INSTALLED
|
||||
# This is handled specially below
|
||||
else
|
||||
ifdef LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
||||
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
|
||||
LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) :=
|
||||
else
|
||||
ifdef LOCAL_SRC_FILES_$(my_32_64_bit_suffix)
|
||||
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES_$(my_32_64_bit_suffix))
|
||||
LOCAL_SRC_FILES_$(my_32_64_bit_suffix) :=
|
||||
else
|
||||
my_prebuilt_src_file := $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
|
||||
LOCAL_SRC_FILES :=
|
||||
endif
|
||||
endif
|
||||
$(call pretty-error,No source files specified)
|
||||
endif
|
||||
|
||||
LOCAL_CHECKED_MODULE := $(my_prebuilt_src_file)
|
||||
|
|
Loading…
Reference in New Issue