SConscript (11330:c2146e4e20cd) SConscript (11342:a4d19e7cd26d)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 1069 unchanged lines hidden (view full) ---

1078 # Only gcc >= 4.9 supports UBSan, so check both the version
1079 # and the command-line option before adding the compiler and
1080 # linker flags.
1081 if GetOption('with_ubsan') and \
1082 compareVersions(env['GCC_VERSION'], '4.9') >= 0:
1083 new_env.Append(CCFLAGS='-fsanitize=undefined')
1084 new_env.Append(LINKFLAGS='-fsanitize=undefined')
1085
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 1069 unchanged lines hidden (view full) ---

1078 # Only gcc >= 4.9 supports UBSan, so check both the version
1079 # and the command-line option before adding the compiler and
1080 # linker flags.
1081 if GetOption('with_ubsan') and \
1082 compareVersions(env['GCC_VERSION'], '4.9') >= 0:
1083 new_env.Append(CCFLAGS='-fsanitize=undefined')
1084 new_env.Append(LINKFLAGS='-fsanitize=undefined')
1085
1086 # The address sanitizer is available for gcc >= 4.8
1087 if GetOption('with_asan') and \
1088 compareVersions(env['GCC_VERSION'], '4.8') >= 0:
1089 new_env.Append(CCFLAGS='-fsanitize=address')
1090 new_env.Append(LINKFLAGS='-fsanitize=address')
1091
1086 if env['CLANG']:
1087 swig_env.Append(CCFLAGS=['-Wno-sometimes-uninitialized',
1088 '-Wno-deprecated-register',
1089 '-Wno-tautological-compare'])
1090
1092 if env['CLANG']:
1093 swig_env.Append(CCFLAGS=['-Wno-sometimes-uninitialized',
1094 '-Wno-deprecated-register',
1095 '-Wno-tautological-compare'])
1096
1091 # All supported clang versions have support for UBSan, so if
1092 # asked to use it, append the compiler and linker flags.
1097 # We require clang >= 3.1, so there is no need to check any
1098 # versions here.
1093 if GetOption('with_ubsan'):
1094 new_env.Append(CCFLAGS='-fsanitize=undefined')
1095 new_env.Append(LINKFLAGS='-fsanitize=undefined')
1096
1099 if GetOption('with_ubsan'):
1100 new_env.Append(CCFLAGS='-fsanitize=undefined')
1101 new_env.Append(LINKFLAGS='-fsanitize=undefined')
1102
1103 if GetOption('with_asan'):
1104 new_env.Append(CCFLAGS='-fsanitize=address')
1105 new_env.Append(LINKFLAGS='-fsanitize=address')
1106
1097 werror_env = new_env.Clone()
1098 # Treat warnings as errors but white list some warnings that we
1099 # want to allow (e.g., deprecation warnings).
1100 werror_env.Append(CCFLAGS=['-Werror',
1101 '-Wno-error=deprecated-declarations',
1102 '-Wno-error=deprecated',
1103 ])
1104

--- 213 unchanged lines hidden ---
1107 werror_env = new_env.Clone()
1108 # Treat warnings as errors but white list some warnings that we
1109 # want to allow (e.g., deprecation warnings).
1110 werror_env.Append(CCFLAGS=['-Werror',
1111 '-Wno-error=deprecated-declarations',
1112 '-Wno-error=deprecated',
1113 ])
1114

--- 213 unchanged lines hidden ---