summaryrefslogtreecommitdiffstats
path: root/scons/gallium.py
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-04-13 20:25:39 -0700
committerJason Ekstrand <[email protected]>2016-04-13 20:25:39 -0700
commit12f88ba32a14ea79134f4e995a55149f078a2f27 (patch)
tree9070861dced23d0ad7dbec598bfd96b686eb7bf1 /scons/gallium.py
parent79fbec30fc16399ede9385ef52cb62cefbb388f4 (diff)
parent171a570f388b2895d14f6d5418c99573cffd6369 (diff)
Merge remote-tracking branch 'public/master' into vulkan
Diffstat (limited to 'scons/gallium.py')
-rwxr-xr-xscons/gallium.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 46520168a02..f37042d9af1 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -410,7 +410,7 @@ def generate(env):
# Work around aliasing bugs - developers should comment this out
ccflags += ['-fno-strict-aliasing']
ccflags += ['-g']
- if env['build'] in ('checked', 'profile'):
+ if env['build'] in ('checked', 'profile') or env['asan']:
# See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling?
ccflags += [
'-fno-omit-frame-pointer',
@@ -540,6 +540,16 @@ def generate(env):
# scan-build will produce more comprehensive output
env.Append(CCFLAGS = ['--analyze'])
+ # https://github.com/google/sanitizers/wiki/AddressSanitizer
+ if env['asan']:
+ if gcc_compat:
+ env.Append(CCFLAGS = [
+ '-fsanitize=address',
+ ])
+ env.Append(LINKFLAGS = [
+ '-fsanitize=address',
+ ])
+
# Assembler options
if gcc_compat:
if env['machine'] == 'x86':