Skip to content

Commit a1e0579

Browse files
nolangemstorsjo
authored andcommitted
if using an existing clang, test if cfguard is available
1 parent 4735593 commit a1e0579

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build-all.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ for dep in git cmake ${HOST_CLANG}; do
9595
fi
9696
done
9797

98+
if [ -n "${HOST_CLANG}" ] && [ "${CFGUARD_ARGS}" = "--enable-cfguard" ]; then
99+
"${HOST_CLANG}" -c -x c -o - - -Werror -mguard=cf </dev/null >/dev/null 2>/dev/null || CFGUARD_ARGS="--disable-cfguard"
100+
fi
101+
98102
if [ -z "$NO_TOOLS" ]; then
99103
if [ -z "${HOST_CLANG}" ]; then
100104
./build-llvm.sh $PREFIX $LLVM_ARGS $HOST_ARGS

0 commit comments

Comments
 (0)