Skip to content

Commit

Permalink
if using an existing clang, test if cfguard is available
Browse files Browse the repository at this point in the history
  • Loading branch information
nolange committed Jan 16, 2024
1 parent ac0fe15 commit b30639a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ for dep in git cmake ${HOST_CLANG}; do
fi
done

if [ -n "${HOST_CLANG}" ] && [ "${CFGUARD_ARGS}" = "--enable-cfguard" ]; then
"${HOST_CLANG}" -c -x c -o - - -Werror -mguard=cf </dev/null >/dev/null 2>/dev/null || CFGUARD_ARGS="--disable-cfguard"
fi

if [ -z "$NO_TOOLS" ]; then
if [ -z "${HOST_CLANG}" ]; then
./build-llvm.sh $PREFIX $LLVM_ARGS $HOST_ARGS
Expand Down

0 comments on commit b30639a

Please sign in to comment.