2012-05-21 15:12:37 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2008-12-02 22:46:37 +03:00
|
|
|
# The entire tree should be subject to static analysis using the XPCOM
|
|
|
|
# script. Additional scripts may be added by specific subdirectories.
|
|
|
|
|
2008-12-11 19:40:04 +03:00
|
|
|
DEHYDRA_SCRIPT = $(topsrcdir)/config/static-checking.js
|
2008-12-02 22:46:37 +03:00
|
|
|
|
2014-02-11 05:37:47 +04:00
|
|
|
ifndef JS_STANDALONE
|
2008-12-02 22:46:37 +03:00
|
|
|
DEHYDRA_MODULES = \
|
|
|
|
$(topsrcdir)/xpcom/analysis/final.js \
|
2009-09-18 21:26:13 +04:00
|
|
|
$(topsrcdir)/xpcom/analysis/must-override.js \
|
2008-12-02 22:46:37 +03:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
TREEHYDRA_MODULES = \
|
|
|
|
$(topsrcdir)/xpcom/analysis/outparams.js \
|
|
|
|
$(topsrcdir)/xpcom/analysis/stack.js \
|
|
|
|
$(topsrcdir)/xpcom/analysis/flow.js \
|
2010-08-19 05:04:39 +04:00
|
|
|
$(topsrcdir)/xpcom/analysis/static-init.js \
|
2009-08-07 19:16:26 +04:00
|
|
|
$(topsrcdir)/layout/generic/frame-verify.js \
|
2008-12-02 22:46:37 +03:00
|
|
|
$(NULL)
|
2014-01-14 02:38:40 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
TREEHYDRA_MODULES += \
|
|
|
|
$(topsrcdir)/js/src/jsstack.js \
|
|
|
|
$(NULL)
|
2008-12-02 22:46:37 +03:00
|
|
|
|
2010-08-19 05:06:05 +04:00
|
|
|
DEHYDRA_ARG_PREFIX=-fplugin-arg-gcc_treehydra-
|
|
|
|
|
2008-12-02 22:46:37 +03:00
|
|
|
DEHYDRA_ARGS = \
|
2010-08-19 05:06:05 +04:00
|
|
|
$(DEHYDRA_ARG_PREFIX)script=$(DEHYDRA_SCRIPT) \
|
|
|
|
$(DEHYDRA_ARG_PREFIX)topsrcdir=$(topsrcdir) \
|
|
|
|
$(DEHYDRA_ARG_PREFIX)objdir=$(DEPTH) \
|
|
|
|
$(DEHYDRA_ARG_PREFIX)dehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(DEHYDRA_MODULES))) \
|
|
|
|
$(DEHYDRA_ARG_PREFIX)treehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(TREEHYDRA_MODULES))) \
|
2008-12-02 22:46:37 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2010-08-19 05:06:05 +04:00
|
|
|
DEHYDRA_FLAGS = -fplugin=$(DEHYDRA_PATH) $(DEHYDRA_ARGS)
|
2008-12-02 22:46:37 +03:00
|
|
|
|
|
|
|
ifdef DEHYDRA_PATH
|
|
|
|
OS_CXXFLAGS += $(DEHYDRA_FLAGS)
|
|
|
|
endif
|
2013-03-24 06:12:25 +04:00
|
|
|
|
|
|
|
ifdef ENABLE_CLANG_PLUGIN
|
|
|
|
CLANG_PLUGIN := $(DEPTH)/build/clang-plugin/$(DLL_PREFIX)clang-plugin$(DLL_SUFFIX)
|
|
|
|
OS_CXXFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check
|
|
|
|
OS_CFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check
|
|
|
|
endif
|