Loading core/binary.mk +7 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,13 @@ ifneq ($(my_cc)$(my_cxx),) my_clang := false endif endif # Issue warning if LOCAL_CLANG* is set to false and the local makefile is not found # in the exception project list. ifeq ($(my_clang),false) ifeq ($(call find_in_local_clang_exception_projects,$(LOCAL_MODULE_MAKEFILE)),) $(warning $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): warning: LOCAL_CLANG is set to false) endif endif # clang is enabled by default for host builds # enable it unless we've specifically disabled clang above Loading core/clang/config.mk +17 −0 Original line number Diff line number Diff line Loading @@ -143,4 +143,21 @@ ifeq ($(HOST_PREFER_32_BIT),true) FORCE_BUILD_LLVM_COMPONENTS := true endif # A list of projects that are allowed to set LOCAL_CLANG to false. LOCAL_CLANG_EXCEPTION_PROJECTS := \ device/huawei/angler/ \ device/lge/bullhead/ \ external/valgrind/ \ hardware/qcom/ \ $(INTERNAL_LOCAL_CLANG_EXCEPTION_PROJECTS) # Find $1 in the exception project list. define find_in_local_clang_exception_projects $(subst $(space),, \ $(foreach project,$(LOCAL_CLANG_EXCEPTION_PROJECTS), \ $(if $(filter $(project)%,$(1)),$(project)) \ ) \ ) endef include $(BUILD_SYSTEM)/clang/tidy.mk tools/warn.py +3 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,9 @@ warnpatterns = [ 'description':'make: overriding commands/ignoring old commands', 'patterns':[r".*: warning: overriding commands for target .+", r".*: warning: ignoring old commands for target .+"] }, { 'category':'make', 'severity':severity.HIGH, 'members':[], 'option':'', 'description':'make: LOCAL_CLANG is false', 'patterns':[r".*: warning: LOCAL_CLANG is set to false"] }, { 'category':'C/C++', 'severity':severity.HIGH, 'members':[], 'option':'-Wimplicit-function-declaration', 'description':'Implicit function declaration', 'patterns':[r".*: warning: implicit declaration of function .+", Loading Loading
core/binary.mk +7 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,13 @@ ifneq ($(my_cc)$(my_cxx),) my_clang := false endif endif # Issue warning if LOCAL_CLANG* is set to false and the local makefile is not found # in the exception project list. ifeq ($(my_clang),false) ifeq ($(call find_in_local_clang_exception_projects,$(LOCAL_MODULE_MAKEFILE)),) $(warning $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): warning: LOCAL_CLANG is set to false) endif endif # clang is enabled by default for host builds # enable it unless we've specifically disabled clang above Loading
core/clang/config.mk +17 −0 Original line number Diff line number Diff line Loading @@ -143,4 +143,21 @@ ifeq ($(HOST_PREFER_32_BIT),true) FORCE_BUILD_LLVM_COMPONENTS := true endif # A list of projects that are allowed to set LOCAL_CLANG to false. LOCAL_CLANG_EXCEPTION_PROJECTS := \ device/huawei/angler/ \ device/lge/bullhead/ \ external/valgrind/ \ hardware/qcom/ \ $(INTERNAL_LOCAL_CLANG_EXCEPTION_PROJECTS) # Find $1 in the exception project list. define find_in_local_clang_exception_projects $(subst $(space),, \ $(foreach project,$(LOCAL_CLANG_EXCEPTION_PROJECTS), \ $(if $(filter $(project)%,$(1)),$(project)) \ ) \ ) endef include $(BUILD_SYSTEM)/clang/tidy.mk
tools/warn.py +3 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,9 @@ warnpatterns = [ 'description':'make: overriding commands/ignoring old commands', 'patterns':[r".*: warning: overriding commands for target .+", r".*: warning: ignoring old commands for target .+"] }, { 'category':'make', 'severity':severity.HIGH, 'members':[], 'option':'', 'description':'make: LOCAL_CLANG is false', 'patterns':[r".*: warning: LOCAL_CLANG is set to false"] }, { 'category':'C/C++', 'severity':severity.HIGH, 'members':[], 'option':'-Wimplicit-function-declaration', 'description':'Implicit function declaration', 'patterns':[r".*: warning: implicit declaration of function .+", Loading