Backout a74bd5095902, Bug 959405 - Please update the Buri Moz-central, 1.3, 1.2 with...
[gecko.git] / config / static-checking-config.mk
bloba780dc871025d0ce51e9968f1730f901b2c4bc9b
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 # The entire tree should be subject to static analysis using the XPCOM
6 # script. Additional scripts may be added by specific subdirectories.
8 DEHYDRA_SCRIPT = $(topsrcdir)/config/static-checking.js
10 ifndef BUILDING_JS
11 DEHYDRA_MODULES = \
12 $(topsrcdir)/xpcom/analysis/final.js \
13 $(topsrcdir)/xpcom/analysis/must-override.js \
14 $(NULL)
16 TREEHYDRA_MODULES = \
17 $(topsrcdir)/xpcom/analysis/outparams.js \
18 $(topsrcdir)/xpcom/analysis/stack.js \
19 $(topsrcdir)/xpcom/analysis/flow.js \
20 $(topsrcdir)/xpcom/analysis/static-init.js \
21 $(topsrcdir)/layout/generic/frame-verify.js \
22 $(NULL)
23 endif
25 TREEHYDRA_MODULES += \
26 $(topsrcdir)/js/src/jsstack.js \
27 $(NULL)
29 DEHYDRA_ARG_PREFIX=-fplugin-arg-gcc_treehydra-
31 DEHYDRA_ARGS = \
32 $(DEHYDRA_ARG_PREFIX)script=$(DEHYDRA_SCRIPT) \
33 $(DEHYDRA_ARG_PREFIX)topsrcdir=$(topsrcdir) \
34 $(DEHYDRA_ARG_PREFIX)objdir=$(DEPTH) \
35 $(DEHYDRA_ARG_PREFIX)dehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(DEHYDRA_MODULES))) \
36 $(DEHYDRA_ARG_PREFIX)treehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(TREEHYDRA_MODULES))) \
37 $(NULL)
39 DEHYDRA_FLAGS = -fplugin=$(DEHYDRA_PATH) $(DEHYDRA_ARGS)
41 ifdef DEHYDRA_PATH
42 OS_CXXFLAGS += $(DEHYDRA_FLAGS)
43 endif
45 ifdef ENABLE_CLANG_PLUGIN
46 ifndef BUILDING_JS
47 CLANG_PLUGIN := $(DEPTH)/build/clang-plugin/$(DLL_PREFIX)clang-plugin$(DLL_SUFFIX)
48 else
49 CLANG_PLUGIN := $(DEPTH)/../../build/clang-plugin/$(DLL_PREFIX)clang-plugin$(DLL_SUFFIX)
50 endif
51 OS_CXXFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check
52 OS_CFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check
53 endif