You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
814 B
30 lines
814 B
#!/bin/bash
|
|
|
|
# This is a wrapper for clang/clang++ gcc/g++
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
if [ -z "$INFER_RESULTS_DIR" ]; then
|
|
echo '$INFER_RESULTS_DIR with a path to the results dir not provided.' > /dev/stderr
|
|
exit 1
|
|
fi
|
|
|
|
# invoke the right compiler looking at the final plusplus (e.g. gcc/g++ clang/clang++)
|
|
if [ "${0%++}" != "$0" ]; then INFER_XX="++"; fi
|
|
export INFER_XX
|
|
|
|
FRONTEND_COMMAND=("$SCRIPT_DIR/../../bin/InferClang" "$@")
|
|
HOST_COMPILER_COMMAND=("$SCRIPT_DIR/../clang_wrappers/filter_args_and_run_fcp_clang$INFER_XX" "$@")
|
|
|
|
if [ -n "$INFER_COMPILER_WRAPPER_IN_RECURSION" ]; then
|
|
if [ -z "$INFER_LISTENER" ]; then
|
|
"${HOST_COMPILER_COMMAND[@]}"
|
|
fi
|
|
else
|
|
export INFER_COMPILER_WRAPPER_IN_RECURSION="Y"
|
|
|
|
"${FRONTEND_COMMAND[@]}"
|
|
fi
|
|
|
|
exit $?
|