michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # The entire tree should be subject to static analysis using the XPCOM michael@0: # script. Additional scripts may be added by specific subdirectories. michael@0: michael@0: DEHYDRA_SCRIPT = $(topsrcdir)/config/static-checking.js michael@0: michael@0: ifndef JS_STANDALONE michael@0: DEHYDRA_MODULES = \ michael@0: $(topsrcdir)/xpcom/analysis/final.js \ michael@0: $(topsrcdir)/xpcom/analysis/must-override.js \ michael@0: $(NULL) michael@0: michael@0: TREEHYDRA_MODULES = \ michael@0: $(topsrcdir)/xpcom/analysis/outparams.js \ michael@0: $(topsrcdir)/xpcom/analysis/stack.js \ michael@0: $(topsrcdir)/xpcom/analysis/flow.js \ michael@0: $(topsrcdir)/xpcom/analysis/static-init.js \ michael@0: $(topsrcdir)/layout/generic/frame-verify.js \ michael@0: $(NULL) michael@0: endif michael@0: michael@0: TREEHYDRA_MODULES += \ michael@0: $(topsrcdir)/js/src/jsstack.js \ michael@0: $(NULL) michael@0: michael@0: DEHYDRA_ARG_PREFIX=-fplugin-arg-gcc_treehydra- michael@0: michael@0: DEHYDRA_ARGS = \ michael@0: $(DEHYDRA_ARG_PREFIX)script=$(DEHYDRA_SCRIPT) \ michael@0: $(DEHYDRA_ARG_PREFIX)topsrcdir=$(topsrcdir) \ michael@0: $(DEHYDRA_ARG_PREFIX)objdir=$(DEPTH) \ michael@0: $(DEHYDRA_ARG_PREFIX)dehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(DEHYDRA_MODULES))) \ michael@0: $(DEHYDRA_ARG_PREFIX)treehydra-modules=$(subst $(NULL) ,$(COMMA),$(strip $(TREEHYDRA_MODULES))) \ michael@0: $(NULL) michael@0: michael@0: DEHYDRA_FLAGS = -fplugin=$(DEHYDRA_PATH) $(DEHYDRA_ARGS) michael@0: michael@0: ifdef DEHYDRA_PATH michael@0: OS_CXXFLAGS += $(DEHYDRA_FLAGS) michael@0: endif michael@0: michael@0: ifdef ENABLE_CLANG_PLUGIN michael@0: CLANG_PLUGIN := $(DEPTH)/build/clang-plugin/$(DLL_PREFIX)clang-plugin$(DLL_SUFFIX) michael@0: OS_CXXFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check michael@0: OS_CFLAGS += -Xclang -load -Xclang $(CLANG_PLUGIN) -Xclang -add-plugin -Xclang moz-check michael@0: endif