scons: Disable Address Sanitizer for GCC (#951)
This removes the '--with-asan' as it's are not compatible with GCC. The `--with-asan` incompatibility with GCC is discussed in Issue #916.
This commit is contained in:
12
SConstruct
12
SConstruct
@@ -707,10 +707,16 @@ for variant_path in variant_paths:
|
||||
if GetOption('with_ubsan'):
|
||||
sanitizers.append('undefined')
|
||||
if GetOption('with_asan'):
|
||||
# Available for gcc >= 5 or llvm >= 3.1 both a requirement
|
||||
# by the build system
|
||||
if env['GCC']:
|
||||
# Address sanitizer is not supported with GCC. Please see Github
|
||||
# Issue https://github.com/gem5/gem5/issues/916 for more details.
|
||||
warning("Address Sanitizer is not supported with GCC. "
|
||||
"This option will be ignored.")
|
||||
else:
|
||||
# Available for llvm >= 3.1. A requirement by the build system.
|
||||
sanitizers.append('address')
|
||||
suppressions_file = Dir('util').File('lsan-suppressions').get_abspath()
|
||||
suppressions_file = Dir('util').File('lsan-suppressions')\
|
||||
.get_abspath()
|
||||
suppressions_opt = 'suppressions=%s' % suppressions_file
|
||||
suppressions_opts = ':'.join([suppressions_opt,
|
||||
'print_suppressions=0'])
|
||||
|
||||
Reference in New Issue
Block a user