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.
25 lines
874 B
25 lines
874 B
#!/bin/bash
|
|
|
|
## Wrapper around infertop. To build infertop, run `make toplevel`.
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# where to find toplevel.bc, can be overridden
|
|
BUILD_DIR=${BUILD_DIR:-"$SCRIPT_DIR"/../infer/src/_build/default}
|
|
INCLUDE_FLAGS=$(find "$BUILD_DIR" -type d -name '*.objs' -exec printf -- '-I {}\n' \;)
|
|
|
|
# The -init option is effective only in interactive mode.
|
|
# In batch mode, scripts need to import toplevel_init themselves.
|
|
# It can be done by adding #use "toplevel_init";; to the beginning
|
|
# of a script.
|
|
# NOTE: $SCRIPT_DIR is added search path for batch scripts
|
|
# so they can be located anywhere and still find toplevel_init
|
|
# file. In interactive mode $SCRIPT_DIR isn't needed
|
|
|
|
set -x
|
|
"$SCRIPT_DIR"/../infer/bin/infertop.bc \
|
|
-init "$SCRIPT_DIR"/toplevel_init \
|
|
$INCLUDE_FLAGS \
|
|
-I "$SCRIPT_DIR" \
|
|
"$@"
|