SConscript (10455:30b40ca619ba) | SConscript (10457:c0302ad57921) |
---|---|
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 --- 939 unchanged lines hidden (view full) --- 948 949 # If gcc supports it, also warn for deletion of derived 950 # classes with non-virtual desctructors. For gcc >= 4.7 we 951 # also have to disable warnings about the SWIG code having 952 # potentially uninitialized variables. 953 if compareVersions(env['GCC_VERSION'], '4.7') >= 0: 954 new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor') 955 swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized') | 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 --- 939 unchanged lines hidden (view full) --- 948 949 # If gcc supports it, also warn for deletion of derived 950 # classes with non-virtual desctructors. For gcc >= 4.7 we 951 # also have to disable warnings about the SWIG code having 952 # potentially uninitialized variables. 953 if compareVersions(env['GCC_VERSION'], '4.7') >= 0: 954 new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor') 955 swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized') |
956 957 # Only gcc >= 4.9 supports UBSan, so check both the version 958 # and the command-line option before adding the compiler and 959 # linker flags. 960 if GetOption('with_ubsan') and \ 961 compareVersions(env['GCC_VERSION'], '4.9') >= 0: 962 new_env.Append(CCFLAGS='-fsanitize=undefined') 963 new_env.Append(LINKFLAGS='-fsanitize=undefined') 964 |
|
956 if env['CLANG']: 957 # Always enable the warning for deletion of derived classes 958 # with non-virtual destructors 959 new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor']) 960 961 swig_env.Append(CCFLAGS=[ 962 # Some versions of SWIG can return uninitialized values 963 '-Wno-sometimes-uninitialized', 964 # Register storage is requested in a lot of places in 965 # SWIG-generated code. 966 '-Wno-deprecated-register', 967 ]) 968 | 965 if env['CLANG']: 966 # Always enable the warning for deletion of derived classes 967 # with non-virtual destructors 968 new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor']) 969 970 swig_env.Append(CCFLAGS=[ 971 # Some versions of SWIG can return uninitialized values 972 '-Wno-sometimes-uninitialized', 973 # Register storage is requested in a lot of places in 974 # SWIG-generated code. 975 '-Wno-deprecated-register', 976 ]) 977 |
978 # All supported clang versions have support for UBSan, so if 979 # asked to use it, append the compiler and linker flags. 980 if GetOption('with_ubsan'): 981 new_env.Append(CCFLAGS='-fsanitize=undefined') 982 new_env.Append(LINKFLAGS='-fsanitize=undefined') 983 |
|
969 werror_env = new_env.Clone() 970 werror_env.Append(CCFLAGS='-Werror') 971 972 def make_obj(source, static, extra_deps = None): 973 '''This function adds the specified source to the correct 974 build environment, and returns the corresponding SCons Object 975 nodes''' 976 --- 208 unchanged lines hidden --- | 984 werror_env = new_env.Clone() 985 werror_env.Append(CCFLAGS='-Werror') 986 987 def make_obj(source, static, extra_deps = None): 988 '''This function adds the specified source to the correct 989 build environment, and returns the corresponding SCons Object 990 nodes''' 991 --- 208 unchanged lines hidden --- |