Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
07ab46d3
Commit
07ab46d3
authored
Sep 17, 2015
by
Peter W. Draper
Browse files
Add sanitizer support for clang
Former-commit-id: 972a777ff245226ceb96c85bfb87cba5182827cf
parent
a43cda7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
07ab46d3
...
...
@@ -151,7 +151,7 @@ if test "$enable_opt" = "yes" ; then
fi
# Add address sanitizer options to flags, if requested. Only useful for GCC
# version 4.8 and later.
# version 4.8 and later
and clang
.
AC_ARG_ENABLE([sanitizer],
[AS_HELP_STRING([--enable-sanitizer],
[Enable memory error detection using address sanitizer @<:@no/yes@:>@]
...
...
@@ -164,9 +164,12 @@ if test "$enable_san" = "yes"; then
if test "$ax_cv_c_compiler_vendor" = "gnu"; then
AX_COMPARE_VERSION( $ax_cv_c_compiler_version, [ge], [4.8.0],
[enable_san="yes"], [enable_san="no"] )
if test "$enable_san" = "yes"; then
CFLAGS="$CFLAGS -fsanitize=address -fno-omit-frame-pointer"
fi
elif test "$ax_cv_c_compiler_vendor" = "clang"; then
AX_COMPARE_VERSION( $ax_cv_c_compiler_version, [ge], [3.2.0],
[enable_san="yes"], [enable_san="no"] )
fi
if test "$enable_san" = "yes"; then
CFLAGS="$CFLAGS -fsanitize=address -fno-omit-frame-pointer"
else
AC_MSG_WARN([Compiler does not support address sanitizer option])
fi
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment