Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 2 | |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 3 | import platform |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 4 | from waflib import Configure, Logs, Utils |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 5 | |
| 6 | def options(opt): |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 7 | opt.add_option('--debug', '--with-debug', action='store_true', default=False, |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 8 | help='Compile in debugging mode with minimal optimizations (-Og)') |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 9 | |
| 10 | def configure(conf): |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 11 | conf.start_msg('Checking C++ compiler version') |
| 12 | |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 13 | cxx = conf.env.CXX_NAME # generic name of the compiler |
| 14 | ccver = tuple(int(i) for i in conf.env.CC_VERSION) |
| 15 | ccverstr = '.'.join(conf.env.CC_VERSION) |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 16 | errmsg = '' |
| 17 | warnmsg = '' |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 18 | if cxx == 'gcc': |
Davide Pesavento | 541a822 | 2022-03-01 15:08:42 -0500 | [diff] [blame] | 19 | if ccver < (7, 4, 0): |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 20 | errmsg = ('The version of gcc you are using is too old.\n' |
Davide Pesavento | 541a822 | 2022-03-01 15:08:42 -0500 | [diff] [blame] | 21 | 'The minimum supported gcc version is 7.4.') |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 22 | conf.flags = GccFlags() |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 23 | elif cxx == 'clang': |
Davide Pesavento | 541a822 | 2022-03-01 15:08:42 -0500 | [diff] [blame] | 24 | if Utils.unversioned_sys_platform() == 'darwin': |
| 25 | if ccver < (10, 0, 0): |
| 26 | errmsg = ('The version of Xcode you are using is too old.\n' |
| 27 | 'The minimum supported Xcode version is 11.3.') |
| 28 | elif ccver < (11, 0, 0): |
| 29 | warnmsg = ('Using a version of Xcode older than 11.3 is not ' |
| 30 | 'officially supported and may result in build failures.') |
| 31 | elif ccver < (6, 0, 0): |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 32 | errmsg = ('The version of clang you are using is too old.\n' |
Davide Pesavento | 541a822 | 2022-03-01 15:08:42 -0500 | [diff] [blame] | 33 | 'The minimum supported clang version is 6.0.') |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 34 | conf.flags = ClangFlags() |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 35 | else: |
Davide Pesavento | f662500 | 2022-07-31 17:15:02 -0400 | [diff] [blame] | 36 | warnmsg = f'{cxx} compiler is unsupported' |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 37 | conf.flags = CompilerFlags() |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 38 | |
| 39 | if errmsg: |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 40 | conf.end_msg(ccverstr, color='RED') |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 41 | conf.fatal(errmsg) |
| 42 | elif warnmsg: |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 43 | conf.end_msg(ccverstr, color='YELLOW') |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 44 | Logs.warn('WARNING: ' + warnmsg) |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 45 | else: |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 46 | conf.end_msg(ccverstr) |
Alexander Afanasyev | b78bc4d | 2014-04-09 21:20:52 -0700 | [diff] [blame] | 47 | |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 48 | conf.areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0) |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 49 | |
Davide Pesavento | 1fd0024 | 2018-05-20 00:11:01 -0400 | [diff] [blame] | 50 | # General flags are always applied (e.g., selecting C++ language standard) |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 51 | generalFlags = conf.flags.getGeneralFlags(conf) |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 52 | conf.add_supported_cxxflags(generalFlags['CXXFLAGS']) |
| 53 | conf.add_supported_linkflags(generalFlags['LINKFLAGS']) |
| 54 | conf.env.DEFINES += generalFlags['DEFINES'] |
| 55 | |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 56 | @Configure.conf |
| 57 | def check_compiler_flags(conf): |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 58 | # Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 59 | # corresponding environment variables are not set. |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 60 | # DEFINES are always applied. |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 61 | if conf.options.debug: |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 62 | extraFlags = conf.flags.getDebugFlags(conf) |
| 63 | if conf.areCustomCxxflagsPresent: |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 64 | missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS] |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 65 | if missingFlags: |
| 66 | Logs.warn('Selected debug mode, but CXXFLAGS is set to a custom value "%s"' |
| 67 | % ' '.join(conf.env.CXXFLAGS)) |
| 68 | Logs.warn('Default flags "%s" will not be used' % ' '.join(missingFlags)) |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 69 | else: |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 70 | extraFlags = conf.flags.getOptimizedFlags(conf) |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 71 | |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 72 | if not conf.areCustomCxxflagsPresent: |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 73 | conf.add_supported_cxxflags(extraFlags['CXXFLAGS']) |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 74 | conf.add_supported_linkflags(extraFlags['LINKFLAGS']) |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 75 | |
| 76 | conf.env.DEFINES += extraFlags['DEFINES'] |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 77 | |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 78 | @Configure.conf |
| 79 | def add_supported_cxxflags(self, cxxflags): |
| 80 | """ |
| 81 | Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable |
| 82 | """ |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 83 | if len(cxxflags) == 0: |
| 84 | return |
| 85 | |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 86 | self.start_msg('Checking supported CXXFLAGS') |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 87 | |
| 88 | supportedFlags = [] |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 89 | for flags in cxxflags: |
| 90 | flags = Utils.to_list(flags) |
| 91 | if self.check_cxx(cxxflags=['-Werror'] + flags, mandatory=False): |
| 92 | supportedFlags += flags |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 93 | |
Alexander Afanasyev | b78bc4d | 2014-04-09 21:20:52 -0700 | [diff] [blame] | 94 | self.end_msg(' '.join(supportedFlags)) |
Davide Pesavento | 1349d2d | 2016-08-09 06:43:57 +0200 | [diff] [blame] | 95 | self.env.prepend_value('CXXFLAGS', supportedFlags) |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 96 | |
| 97 | @Configure.conf |
| 98 | def add_supported_linkflags(self, linkflags): |
| 99 | """ |
| 100 | Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable |
| 101 | """ |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 102 | if len(linkflags) == 0: |
| 103 | return |
| 104 | |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 105 | self.start_msg('Checking supported LINKFLAGS') |
| 106 | |
| 107 | supportedFlags = [] |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 108 | for flags in linkflags: |
| 109 | flags = Utils.to_list(flags) |
| 110 | if self.check_cxx(linkflags=['-Werror'] + flags, mandatory=False): |
| 111 | supportedFlags += flags |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 112 | |
| 113 | self.end_msg(' '.join(supportedFlags)) |
Davide Pesavento | 1349d2d | 2016-08-09 06:43:57 +0200 | [diff] [blame] | 114 | self.env.prepend_value('LINKFLAGS', supportedFlags) |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 115 | |
| 116 | |
| 117 | class CompilerFlags(object): |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 118 | def getCompilerVersion(self, conf): |
| 119 | return tuple(int(i) for i in conf.env.CC_VERSION) |
| 120 | |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 121 | def getGeneralFlags(self, conf): |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 122 | """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed""" |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 123 | return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': []} |
| 124 | |
| 125 | def getDebugFlags(self, conf): |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 126 | """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in debug mode""" |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 127 | return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['_DEBUG']} |
| 128 | |
| 129 | def getOptimizedFlags(self, conf): |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 130 | """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in optimized mode""" |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 131 | return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['NDEBUG']} |
| 132 | |
| 133 | class GccBasicFlags(CompilerFlags): |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 134 | """ |
| 135 | This class defines basic flags that work for both gcc and clang compilers |
| 136 | """ |
Davide Pesavento | 724d65a | 2017-06-23 17:14:08 -0400 | [diff] [blame] | 137 | def getGeneralFlags(self, conf): |
| 138 | flags = super(GccBasicFlags, self).getGeneralFlags(conf) |
Davide Pesavento | 1fd0024 | 2018-05-20 00:11:01 -0400 | [diff] [blame] | 139 | flags['CXXFLAGS'] += ['-std=c++14'] |
Davide Pesavento | ea5ce49 | 2022-09-30 20:25:25 -0400 | [diff] [blame] | 140 | if Utils.unversioned_sys_platform() != 'darwin': |
Davide Pesavento | 64ae55d | 2018-12-19 00:25:47 -0500 | [diff] [blame] | 141 | flags['LINKFLAGS'] += ['-fuse-ld=lld'] |
Davide Pesavento | 724d65a | 2017-06-23 17:14:08 -0400 | [diff] [blame] | 142 | return flags |
| 143 | |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 144 | def getDebugFlags(self, conf): |
| 145 | flags = super(GccBasicFlags, self).getDebugFlags(conf) |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 146 | flags['CXXFLAGS'] += ['-Og', |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 147 | '-g3', |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 148 | '-pedantic', |
| 149 | '-Wall', |
| 150 | '-Wextra', |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 151 | '-Werror', |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 152 | '-Wcatch-value=2', |
| 153 | '-Wextra-semi', |
Davide Pesavento | 7f20d6e | 2017-01-16 14:43:58 -0500 | [diff] [blame] | 154 | '-Wnon-virtual-dtor', |
Alexander Afanasyev | 465c973 | 2016-10-11 16:35:32 -0700 | [diff] [blame] | 155 | '-Wno-error=deprecated-declarations', # Bug #3795 |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 156 | '-Wno-error=maybe-uninitialized', # Bug #1615 |
| 157 | '-Wno-unused-parameter', |
Davide Pesavento | 1aafba4 | 2015-09-17 17:22:31 -0700 | [diff] [blame] | 158 | ] |
Davide Pesavento | 64ae55d | 2018-12-19 00:25:47 -0500 | [diff] [blame] | 159 | flags['LINKFLAGS'] += ['-Wl,-O1'] |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 160 | return flags |
| 161 | |
| 162 | def getOptimizedFlags(self, conf): |
| 163 | flags = super(GccBasicFlags, self).getOptimizedFlags(conf) |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 164 | flags['CXXFLAGS'] += ['-O2', |
Davide Pesavento | 1aafba4 | 2015-09-17 17:22:31 -0700 | [diff] [blame] | 165 | '-g', |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 166 | '-pedantic', |
| 167 | '-Wall', |
| 168 | '-Wextra', |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 169 | '-Wcatch-value=2', |
| 170 | '-Wextra-semi', |
Davide Pesavento | 7f20d6e | 2017-01-16 14:43:58 -0500 | [diff] [blame] | 171 | '-Wnon-virtual-dtor', |
Davide Pesavento | 7c02b47 | 2015-10-28 20:50:17 +0100 | [diff] [blame] | 172 | '-Wno-unused-parameter', |
Davide Pesavento | 1aafba4 | 2015-09-17 17:22:31 -0700 | [diff] [blame] | 173 | ] |
Davide Pesavento | 64ae55d | 2018-12-19 00:25:47 -0500 | [diff] [blame] | 174 | flags['LINKFLAGS'] += ['-Wl,-O1'] |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 175 | return flags |
| 176 | |
| 177 | class GccFlags(GccBasicFlags): |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 178 | def getDebugFlags(self, conf): |
| 179 | flags = super(GccFlags, self).getDebugFlags(conf) |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 180 | flags['CXXFLAGS'] += ['-fdiagnostics-color', |
| 181 | '-Wredundant-tags', |
| 182 | ] |
Davide Pesavento | 541a822 | 2022-03-01 15:08:42 -0500 | [diff] [blame] | 183 | if platform.machine() == 'armv7l': |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 184 | flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106 |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 185 | return flags |
| 186 | |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 187 | def getOptimizedFlags(self, conf): |
| 188 | flags = super(GccFlags, self).getOptimizedFlags(conf) |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 189 | flags['CXXFLAGS'] += ['-fdiagnostics-color', |
| 190 | '-Wredundant-tags', |
| 191 | ] |
Davide Pesavento | 541a822 | 2022-03-01 15:08:42 -0500 | [diff] [blame] | 192 | if platform.machine() == 'armv7l': |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 193 | flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106 |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 194 | return flags |
| 195 | |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 196 | class ClangFlags(GccBasicFlags): |
| 197 | def getGeneralFlags(self, conf): |
| 198 | flags = super(ClangFlags, self).getGeneralFlags(conf) |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 199 | if Utils.unversioned_sys_platform() == 'darwin': |
Alexander Afanasyev | 5560fd4 | 2018-03-07 17:03:03 -0500 | [diff] [blame] | 200 | # Bug #4296 |
Davide Pesavento | f662500 | 2022-07-31 17:15:02 -0400 | [diff] [blame] | 201 | brewdir = '/opt/homebrew' if platform.machine() == 'arm64' else '/usr/local' |
| 202 | flags['CXXFLAGS'] += [['-isystem', f'{brewdir}/include'], # for Homebrew |
Alexander Afanasyev | b82d8c3 | 2017-09-21 11:35:07 -0400 | [diff] [blame] | 203 | ['-isystem', '/opt/local/include']] # for MacPorts |
Davide Pesavento | 71c622b | 2020-04-24 01:39:01 -0400 | [diff] [blame] | 204 | elif Utils.unversioned_sys_platform() == 'freebsd': |
| 205 | # Bug #4790 |
| 206 | flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']] |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 207 | return flags |
| 208 | |
| 209 | def getDebugFlags(self, conf): |
| 210 | flags = super(ClangFlags, self).getDebugFlags(conf) |
Davide Pesavento | 1aafba4 | 2015-09-17 17:22:31 -0700 | [diff] [blame] | 211 | flags['CXXFLAGS'] += ['-fcolor-diagnostics', |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 212 | '-Wundefined-func-template', |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 213 | '-Wno-unused-local-typedef', # Bugs #2657 and #3209 |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 214 | ] |
| 215 | return flags |
| 216 | |
| 217 | def getOptimizedFlags(self, conf): |
| 218 | flags = super(ClangFlags, self).getOptimizedFlags(conf) |
| 219 | flags['CXXFLAGS'] += ['-fcolor-diagnostics', |
Davide Pesavento | 88a0d81 | 2017-08-19 21:31:42 -0400 | [diff] [blame] | 220 | '-Wundefined-func-template', |
Davide Pesavento | d06ea05 | 2015-10-02 01:48:24 +0200 | [diff] [blame] | 221 | '-Wno-unused-local-typedef', # Bugs #2657 and #3209 |
Davide Pesavento | 1aafba4 | 2015-09-17 17:22:31 -0700 | [diff] [blame] | 222 | ] |
Alexander Afanasyev | 0151579 | 2014-12-16 14:20:01 -0800 | [diff] [blame] | 223 | return flags |