Bug 838029 - Add --with-sixgill option and Makefile for static analysis. r=ted,reluctantly

--HG--
extra : rebase_source : 3c45de22f013566e56d68c4fbeb346159df23192
This commit is contained in:
Steve Fink 2013-01-28 13:43:54 -08:00
Родитель 147b0e4789
Коммит 18e4596ee2
3 изменённых файлов: 62 добавлений и 0 удалений

Просмотреть файл

@ -3761,6 +3761,23 @@ if test -n "$DEHYDRA_PATH"; then
fi
AC_SUBST(DEHYDRA_PATH)
dnl ========================================================
dnl = Enable static checking using sixgill
dnl ========================================================
MOZ_ARG_WITH_STRING(sixgill,
[ --with-sixgill=path/to/sixgill
Enable static checking of code using sixgill],
SIXGILL_PATH=$withval,
SIXGILL_PATH= )
if test -n "$SIXGILL_PATH"; then
if test ! -x "$SIXGILL_PATH/bin/xdbfind" || test ! -f "$SIXGILL_PATH/gcc/xgill.so" || test ! -x "$SIXGILL_PATH/scripts/wrap_gcc/g++"; then
AC_MSG_ERROR([The sixgill plugin and binaries are not at the specified path.])
fi
fi
AC_SUBST(SIXGILL_PATH)
dnl ========================================================
dnl = Enable stripping of libs & executables
dnl ========================================================

Просмотреть файл

@ -0,0 +1,43 @@
# -*- Mode: makefile -*-
#
# 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/.
# This Makefile is used to kick off a static rooting analysis. This Makefile is
# NOT intended for use as part of the standard Mozilla build. Instead, this
# Makefile will use $PATH to subvert compiler invocations to add in the sixgill
# plugin, and then do a regular build of whatever portion of the tree you are
# analyzing. The plugins will dump out several xdb database files. Various
# analysis scripts, written in JS, will run over those database files to
# produce the final analysis output.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
VPATH += $(srcdir)
# Tree to build and analyze, defaulting to the current tree
TARGET_JSOBJDIR ?= $(MOZ_BUILD_ROOT)
# Path to a JS binary to use to run the analysis. You really want this to be an
# optimized build.
JS ?= $(MOZ_BUILD_ROOT)/shell/js
# Path to an xgill checkout containing the GCC plugin, xdb-processing binaries,
# and compiler wrapper scripts used to automatically integrate into an existing
# build system.
SIXGILL ?= @SIXGILL_PATH@
# Path to the JS scripts that will perform the analysis, defaulting to the same
# place as this Makefile.in, which is probably what you want.
ANALYSIS_SCRIPT_DIR ?= $(srcdir)
# Number of simultanous analyzeRoots.js scripts to run.
JOBS ?= 6
all: ; true

Просмотреть файл

@ -20,3 +20,5 @@ if CONFIG['OS_ARCH'] != 'ANDROID':
TEST_DIRS += ['jsapi-tests']
TEST_DIRS += ['tests', 'gdb']
CONFIGURE_SUBST_FILES += ['devtools/rootAnalysis/Makefile']