-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathinfer_repl
More file actions
executable file
·25 lines (20 loc) · 900 Bytes
/
infer_repl
File metadata and controls
executable file
·25 lines (20 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/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/_build/default/src}
BIN_DIR="$SCRIPT_DIR/../infer/bin"
INCLUDE_FLAGS=$(find "$BUILD_DIR" -type d -name '*.objs' -exec printf -- '-I {}/byte\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
$BIN_DIR/infertop.bc.exe \
-init "$SCRIPT_DIR"/toplevel_init \
$INCLUDE_FLAGS \
-I "$SCRIPT_DIR" \
"$@"