mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
34 lines
615 B
Bash
Executable File
34 lines
615 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#
|
|
# This file is distributed under the MIT License. See LICENSE.md for details.
|
|
#
|
|
|
|
set -euo pipefail
|
|
|
|
DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
|
|
|
|
SHARE="$DIR/../../share/revng"
|
|
|
|
if ! test -d "$SHARE"; then
|
|
SHARE="$DIR/../share/revng"
|
|
fi
|
|
|
|
if ! test -d "$SHARE"; then
|
|
echo "Cannot find share/revng" > /dev/stderr
|
|
exit 1
|
|
fi
|
|
|
|
if grep "revng error: unexpected use of global variable" "$1"; then
|
|
exit 1
|
|
fi
|
|
|
|
clang \
|
|
-c \
|
|
-fsyntax-only \
|
|
-ferror-limit=0 \
|
|
--config "$SHARE/compile-flags.cfg" \
|
|
-I "$SHARE/include" \
|
|
-o /dev/null \
|
|
"$@"
|