summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-02-17 03:56:20 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2016-02-17 03:56:20 -0500
commita34ff350da1367f5daabfe7cc5b36956bc21898a (patch)
treecb8467f4fd7c186e4c765bf3f4d38c69a4d4d38a /SConstruct
parent0d50979888c1653e9ceb856c6bffa3f5062adeb9 (diff)
downloadgem5-a34ff350da1367f5daabfe7cc5b36956bc21898a.tar.xz
scons: Enable building with the gcc/clang Address Sanitizer
Allow the user to easily build gem5 with the Address Sanitizer, part of both gcc and clang these days.
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct3
1 files changed, 3 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index c291265fc..d791033e7 100755
--- a/SConstruct
+++ b/SConstruct
@@ -194,6 +194,8 @@ AddLocalOption('--without-tcmalloc', dest='without_tcmalloc',
help='Disable linking against tcmalloc')
AddLocalOption('--with-ubsan', dest='with_ubsan', action='store_true',
help='Build with Undefined Behavior Sanitizer if available')
+AddLocalOption('--with-asan', dest='with_asan', action='store_true',
+ help='Build with Address Sanitizer if available')
termcap = get_termcap(GetOption('use_colors'))
@@ -209,6 +211,7 @@ use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
'PYTHONPATH', 'RANLIB', 'SWIG', 'TERM' ])
use_prefixes = [
+ "ASAN_", # address sanitizer symbolizer path and settings
"CCACHE_", # ccache (caching compiler wrapper) configuration
"CCC_", # clang static analyzer configuration
"DISTCC_", # distcc (distributed compiler wrapper) configuration