use -fno-sanitize-trap=cfi to allow a diagnostic to be printed rather
than aborting with a SIGILL.
https://clang.llvm.org/docs/ControlFlowIntegrity.html#trapping-and-diagnostics
Change-Id: I4517cafe3c7b7305ba4845dbadf9fb679c686843
*)
echo "Usage: source set_analyzer_env.sh [<sanitizer>|clear]"
echo " Supported sanitizers:"
- echo " address integer memory thread undefined"
+ echo " address cfi integer memory thread undefined"
return 1
;;
esac
if [ "${sanitizer}" = "cfi" ]; then
# https://clang.llvm.org/docs/ControlFlowIntegrity.html
- cflags="${cflags} -flto -fvisibility=hidden"
- ldflags="${ldflags} -flto -fuse-ld=gold"
+ cflags="${cflags} -fno-sanitize-trap=cfi -flto -fvisibility=hidden"
+ ldflags="${ldflags} -fno-sanitize-trap=cfi -flto -fuse-ld=gold"
export AR="llvm-ar"
fi