Skip to content

Commit b482faa

Browse files
nolangemstorsjo
authored andcommitted
fix: repair check if existing clang supports CFG
An existing clang might support Control flow guard, but does so only for Windows targets.
1 parent 6f07894 commit b482faa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ for dep in git cmake ${HOST_CLANG}; do
136136
done
137137

138138
if [ -n "${HOST_CLANG}" ] && [ "${CFGUARD_ARGS}" = "--enable-cfguard" ]; then
139-
"${HOST_CLANG}" -c -x c -o - - -Werror -mguard=cf </dev/null >/dev/null 2>/dev/null || CFGUARD_ARGS="--disable-cfguard"
139+
"${HOST_CLANG}" -target x86_64-w64-mingw32 -c -x c -o - - -Werror -mguard=cf </dev/null >/dev/null 2>/dev/null || CFGUARD_ARGS="--disable-cfguard"
140140
fi
141141

142142
if [ -n "$FULL_PGO" ]; then

0 commit comments

Comments
 (0)