Hello Andreas Sandberg,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/10181
to review the following change.
Change subject: scons: Fix --with-ubsan/asan compilation flags
......................................................................
scons: Fix --with-ubsan/asan compilation flags
SConstruct was using an undefined env variable; this patch uses the main
Environment variable.
Change-Id: I30ab6b4bbfa6d9a71a30fb33406a799bfb476821
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
---
M SConstruct
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/SConstruct b/SConstruct
index 8fde133..b382d33 100755
--- a/SConstruct
+++ b/SConstruct
@@ -481,21 +481,21 @@
# The address sanitizer is available for gcc >= 4.8
if GetOption('with_asan'):
if GetOption('with_ubsan') and \
- compareVersions(env['GCC_VERSION'], '4.9') >= 0:
- env.Append(CCFLAGS=['-fsanitize=address,undefined',
- '-fno-omit-frame-pointer'],
+ compareVersions(main['GCC_VERSION'], '4.9') >= 0:
+ main.Append(CCFLAGS=['-fsanitize=address,undefined',
+ '-fno-omit-frame-pointer'],
LINKFLAGS='-fsanitize=address,undefined')
else:
- env.Append(CCFLAGS=['-fsanitize=address',
- '-fno-omit-frame-pointer'],
+ main.Append(CCFLAGS=['-fsanitize=address',
+ '-fno-omit-frame-pointer'],
LINKFLAGS='-fsanitize=address')
# Only gcc >= 4.9 supports UBSan, so check both the version
# and the command-line option before adding the compiler and
# linker flags.
elif GetOption('with_ubsan') and \
- compareVersions(env['GCC_VERSION'], '4.9') >= 0:
- env.Append(CCFLAGS='-fsanitize=undefined')
- env.Append(LINKFLAGS='-fsanitize=undefined')
+ compareVersions(main['GCC_VERSION'], '4.9') >= 0:
+ main.Append(CCFLAGS='-fsanitize=undefined')
+ main.Append(LINKFLAGS='-fsanitize=undefined')
elif main['CLANG']:
# Check for a supported version of clang, >= 3.1 is needed to
--
To view, visit https://gem5-review.googlesource.com/10181
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I30ab6b4bbfa6d9a71a30fb33406a799bfb476821
Gerrit-Change-Number: 10181
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev