Clean up some kati warnings
Kati has a `--warn` option that adds some extra Kati-specific warnings -- like using undefined make functions, undefined user functions, likely bad variable lookups, etc. Some of these are bugs, others are fine doing nothing. This fixes up all of them in the core build system. It also complains about $(eval) usage in a recipe not being recommended. Those aren't handled as part of this change. Bug: 72661763 Test: build-aosp_arm.ninja is identical before and after Change-Id: I8e00af142a7745236d3ad4efc9e91ec3ce71a511
This commit is contained in:
parent
d8e3c4eb07
commit
893bebc44b
|
@ -102,10 +102,10 @@ $(eval include $(_path)/$(_name)$(2)) \
|
|||
$(eval AUX_OS_VARIANT_LIST_$(AUX_OS_$(1)):=) \
|
||||
$(call aux-variant-setup-paths,$(_name)) \
|
||||
$(eval AUX_ALL_VARIANTS += $(_name)) \
|
||||
$(eval AUX_ALL_OSES := $(filterout $(AUX_OS_$(_name)),$(AUX_ALL_OSES)) $(AUX_OS_$(_name))) \
|
||||
$(eval AUX_ALL_CPUS := $(filterout $(AUX_CPU_$(_name)),$(AUX_ALL_CPUS)) $(AUX_CPU_$(_name))) \
|
||||
$(eval AUX_ALL_ARCHS := $(filterout $(AUX_ARCH_$(_name)),$(AUX_ALL_ARCHS)) $(AUX_ARCH_$(_name))) \
|
||||
$(eval AUX_ALL_SUBARCHS := $(filterout $(AUX_SUBARCH_$(_name)),$(AUX_ALL_SUBARCHS)) $(AUX_SUBARCH_$(_name)))
|
||||
$(eval AUX_ALL_OSES := $(filter-out $(AUX_OS_$(_name)),$(AUX_ALL_OSES)) $(AUX_OS_$(_name))) \
|
||||
$(eval AUX_ALL_CPUS := $(filter-out $(AUX_CPU_$(_name)),$(AUX_ALL_CPUS)) $(AUX_CPU_$(_name))) \
|
||||
$(eval AUX_ALL_ARCHS := $(filter-out $(AUX_ARCH_$(_name)),$(AUX_ALL_ARCHS)) $(AUX_ARCH_$(_name))) \
|
||||
$(eval AUX_ALL_SUBARCHS := $(filter-out $(AUX_SUBARCH_$(_name)),$(AUX_ALL_SUBARCHS)) $(AUX_SUBARCH_$(_name)))
|
||||
endef
|
||||
|
||||
# Load system configuration referenced by AUX variant config;
|
||||
|
@ -138,7 +138,7 @@ define aux-variant-validate
|
|||
$(eval _all:=) \
|
||||
$(eval _req:=$(addsuffix _$(1),$(aux_env))) \
|
||||
$(foreach var,$(_req),$(eval _all += $(var))) \
|
||||
$(eval _missing := $(filterout $(_all),$(_req))) \
|
||||
$(eval _missing := $(filter-out $(_all),$(_req))) \
|
||||
$(if $(_missing),$(error AUX variant $(1) must define vars: $(_missing)))
|
||||
endef
|
||||
|
||||
|
|
|
@ -840,7 +840,7 @@ FRAMEWORK_MANIFEST_INPUT_FILES := system/libhidl/manifest.xml
|
|||
ifdef DEVICE_FRAMEWORK_MANIFEST_FILE
|
||||
FRAMEWORK_MANIFEST_INPUT_FILES += $(DEVICE_FRAMEWORK_MANIFEST_FILE)
|
||||
endif
|
||||
$(.KATI_obsolete_var DEVICE_FRAMEWORK_MANIFEST_FILE,No one should ever need to use this.)
|
||||
$(KATI_obsolete_var DEVICE_FRAMEWORK_MANIFEST_FILE,No one should ever need to use this.)
|
||||
|
||||
BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt)
|
||||
BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt)
|
||||
|
|
|
@ -1723,6 +1723,10 @@ define delete-dummy.o-if-no-objs
|
|||
$(if $(PRIVATE_ALL_OBJECTS),,$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)AR) d $(1) $(dir $(1))dummy.o \
|
||||
&& rm -f $(dir $(1))dummy.o)
|
||||
endef
|
||||
else
|
||||
create-dummy.o-if-no-objs =
|
||||
get-dummy.o-if-no-objs =
|
||||
delete-dummy.o-if-no-objs =
|
||||
endif # HOST_OS is darwin
|
||||
|
||||
# Explicitly delete the archive first so that ar doesn't
|
||||
|
|
|
@ -12,7 +12,9 @@ ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
|
|||
LOCAL_MODULE_SUFFIX := $(TARGET_EXECUTABLE_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef target-executable-hook
|
||||
$(call target-executable-hook)
|
||||
endif
|
||||
|
||||
skip_build_from_source :=
|
||||
ifdef LOCAL_PREBUILT_MODULE_FILE
|
||||
|
|
|
@ -12,7 +12,9 @@ ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
|
|||
LOCAL_MODULE_SUFFIX := $($(my_prefix)EXECUTABLE_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef host-executable-hook
|
||||
$(call host-executable-hook)
|
||||
endif
|
||||
|
||||
skip_build_from_source :=
|
||||
ifdef LOCAL_PREBUILT_MODULE_FILE
|
||||
|
|
|
@ -20,7 +20,9 @@ ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
|
|||
$(error $(LOCAL_PATH): Cannot set module stem for a library)
|
||||
endif
|
||||
|
||||
ifdef host-shared-library-hook
|
||||
$(call host-shared-library-hook)
|
||||
endif
|
||||
|
||||
skip_build_from_source :=
|
||||
ifdef LOCAL_PREBUILT_MODULE_FILE
|
||||
|
|
|
@ -20,7 +20,9 @@ ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)$(LOCAL_MODULE_STEM
|
|||
$(error $(LOCAL_PATH): Cannot set module stem for a library)
|
||||
endif
|
||||
|
||||
ifdef target-shared-library-hook
|
||||
$(call target-shared-library-hook)
|
||||
endif
|
||||
|
||||
skip_build_from_source :=
|
||||
ifdef LOCAL_PREBUILT_MODULE_FILE
|
||||
|
|
Loading…
Reference in New Issue