Kill usage of INFER_RESULTS_DIR env var

Reviewed By: jberdine

Differential Revision: D4041199

fbshipit-source-id: 78d3de9
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent 6fc1a7e20f
commit 284f7116b0

@ -53,15 +53,14 @@ class MakeCapture:
def get_envvars(self):
env_vars = utils.read_env()
wrappers_path = config.WRAPPERS_DIRECTORY
# INFER_RESULTS_DIR and INFER_OLD_PATH are used by javac wrapper only
env_vars['INFER_OLD_PATH'] = env_vars['PATH']
env_vars['PATH'] = '{wrappers}{sep}{path}'.format(
wrappers=wrappers_path,
sep=os.pathsep,
path=env_vars['PATH'],
)
frontend_env_vars = util.get_clang_frontend_envvars(self.args)
env_vars.update(frontend_env_vars)
env_vars['INFER_RESULTS_DIR'] = args.infer_out
return env_vars
def capture(self):

@ -69,15 +69,3 @@ def base_argparser(description, module_name):
)
return parser
return _func
def get_clang_frontend_envvars(args):
"""Return the environment variables that configure the clang wrapper, e.g.
to emit debug information if needed, and the invocation of the Infer
frontend for Clang, InferClang, e.g. to analyze headers, emit stats, etc"""
env_vars = {}
frontend_args = []
env_vars['INFER_RESULTS_DIR'] = args.infer_out
return env_vars

@ -51,12 +51,7 @@ class XcodebuildCapture:
def get_envvars(self):
env_vars = utils.read_env()
env_vars['FCP_APPLE_CLANG'] = self.apple_clang_path
frontend_env_vars = \
util.get_clang_frontend_envvars(self.args)
env_vars.update(frontend_env_vars)
return env_vars
def capture(self):

@ -6,15 +6,6 @@ BIN_PATH="${SCRIPT_PATH}/../../bin"
if [ "${0%++}" != "$0" ]; then INFER_XX="++"; fi
export INFER_XX
FCP_CLANG_COMPILER="${CLANG_WRAPPERS_PATH%/}/filter_args_and_run_fcp_clang$INFER_XX";
if [ -z "$INFER_RESULTS_DIR" ]; then
# this redirects to the compiler without adding any FCP flag
# this is because xcode requires message category info from the compiler
# and invokes it without any env var set.
export INFER_ARGS="-a^compile"
else
EXTRA_ARGS=-fno-cxx-modules
fi
EXTRA_ARGS=-fno-cxx-modules
"${BIN_PATH}/InferClang" "$@" $EXTRA_ARGS

@ -154,9 +154,7 @@ let run_compilation_file compilation_database file =
let args = Array.of_list (compilation_data.command::compilation_data.args) in
let env = Array.append
(Unix.environment())
(Array.of_list [
"INFER_RESULTS_DIR="^Config.results_dir;
"FCP_RUN_SYNTAX_ONLY=1"]) in
(Array.of_list ["FCP_RUN_SYNTAX_ONLY=1"]) in
Process.exec_command compilation_data.command args env
with Not_found ->
Process.print_error_and_exit "Failed to find compilation data for %s \n%!" file

Loading…
Cancel
Save