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 --- 1001 unchanged lines hidden (view full) --- 1010 swig_env = new_env.Clone() 1011 1012 # Both gcc and clang have issues with unused labels and values in 1013 # the SWIG generated code 1014 swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value']) 1015 1016 # Add additional warnings here that should not be applied to 1017 # the SWIG generated code |
1018 new_env.Append(CXXFLAGS=['-Wmissing-declarations', 1019 '-Wdelete-non-virtual-dtor']) |
1020 1021 if env['GCC']: 1022 # Depending on the SWIG version, we also need to supress 1023 # warnings about uninitialized variables and missing field 1024 # initializers. 1025 swig_env.Append(CCFLAGS=['-Wno-uninitialized', 1026 '-Wno-missing-field-initializers', |
1027 '-Wno-unused-but-set-variable', 1028 '-Wno-maybe-uninitialized']) |
1029 |
1030 # Only gcc >= 4.9 supports UBSan, so check both the version 1031 # and the command-line option before adding the compiler and 1032 # linker flags. 1033 if GetOption('with_ubsan') and \ 1034 compareVersions(env['GCC_VERSION'], '4.9') >= 0: 1035 new_env.Append(CCFLAGS='-fsanitize=undefined') 1036 new_env.Append(LINKFLAGS='-fsanitize=undefined') 1037 1038 if env['CLANG']: |
1039 swig_env.Append(CCFLAGS=[ 1040 # Some versions of SWIG can return uninitialized values 1041 '-Wno-sometimes-uninitialized', 1042 # Register storage is requested in a lot of places in 1043 # SWIG-generated code. 1044 '-Wno-deprecated-register', 1045 ]) 1046 --- 227 unchanged lines hidden --- |