comparison setup.py @ 44605:960770add699

setup: relax -Werror for declaration-after-statement on Python 3.9 It turns out Python 3.9 introduces such declarations in the headers, eg cpython/abstract.h:189:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] so we have to be more relaxed when compiling for 3.9. Differential Revision: https://phab.mercurial-scm.org/D8327
author Augie Fackler <augie@google.com>
date Wed, 25 Mar 2020 11:56:47 -0400
parents 2a98b0cd4995
children 4c6189d45d67
comparison
equal deleted inserted replaced
44602:a89aa2d7b34d 44605:960770add699
1268 ] 1268 ]
1269 common_include_dirs = ['mercurial'] 1269 common_include_dirs = ['mercurial']
1270 1270
1271 common_cflags = [] 1271 common_cflags = []
1272 1272
1273 # MSVC 2008 still needs declarations at the top of the scope. 1273 # MSVC 2008 still needs declarations at the top of the scope, but Python 3.9
1274 if os.name != 'nt': 1274 # makes declarations not at the top of a scope in the headers.
1275 if os.name != 'nt' and sys.version_info[1] < 9:
1275 common_cflags = ['-Werror=declaration-after-statement'] 1276 common_cflags = ['-Werror=declaration-after-statement']
1276 1277
1277 osutil_cflags = [] 1278 osutil_cflags = []
1278 osutil_ldflags = [] 1279 osutil_ldflags = []
1279 1280