Show More
@@ -1268,6 +1268,12 b' common_depends = [' | |||||
1268 | ] |
|
1268 | ] | |
1269 | common_include_dirs = ['mercurial'] |
|
1269 | common_include_dirs = ['mercurial'] | |
1270 |
|
1270 | |||
|
1271 | common_cflags = [] | |||
|
1272 | ||||
|
1273 | # MSVC 2008 still needs declarations at the top of the scope. | |||
|
1274 | if os.name != 'nt': | |||
|
1275 | common_cflags = ['-Werror=declaration-after-statement'] | |||
|
1276 | ||||
1271 | osutil_cflags = [] |
|
1277 | osutil_cflags = [] | |
1272 | osutil_ldflags = [] |
|
1278 | osutil_ldflags = [] | |
1273 |
|
1279 | |||
@@ -1441,18 +1447,21 b' extmodules = [' | |||||
1441 | 'mercurial.cext.base85', |
|
1447 | 'mercurial.cext.base85', | |
1442 | ['mercurial/cext/base85.c'], |
|
1448 | ['mercurial/cext/base85.c'], | |
1443 | include_dirs=common_include_dirs, |
|
1449 | include_dirs=common_include_dirs, | |
|
1450 | extra_compile_args=common_cflags, | |||
1444 | depends=common_depends, |
|
1451 | depends=common_depends, | |
1445 | ), |
|
1452 | ), | |
1446 | Extension( |
|
1453 | Extension( | |
1447 | 'mercurial.cext.bdiff', |
|
1454 | 'mercurial.cext.bdiff', | |
1448 | ['mercurial/bdiff.c', 'mercurial/cext/bdiff.c'] + xdiff_srcs, |
|
1455 | ['mercurial/bdiff.c', 'mercurial/cext/bdiff.c'] + xdiff_srcs, | |
1449 | include_dirs=common_include_dirs, |
|
1456 | include_dirs=common_include_dirs, | |
|
1457 | extra_compile_args=common_cflags, | |||
1450 | depends=common_depends + ['mercurial/bdiff.h'] + xdiff_headers, |
|
1458 | depends=common_depends + ['mercurial/bdiff.h'] + xdiff_headers, | |
1451 | ), |
|
1459 | ), | |
1452 | Extension( |
|
1460 | Extension( | |
1453 | 'mercurial.cext.mpatch', |
|
1461 | 'mercurial.cext.mpatch', | |
1454 | ['mercurial/mpatch.c', 'mercurial/cext/mpatch.c'], |
|
1462 | ['mercurial/mpatch.c', 'mercurial/cext/mpatch.c'], | |
1455 | include_dirs=common_include_dirs, |
|
1463 | include_dirs=common_include_dirs, | |
|
1464 | extra_compile_args=common_cflags, | |||
1456 | depends=common_depends, |
|
1465 | depends=common_depends, | |
1457 | ), |
|
1466 | ), | |
1458 | Extension( |
|
1467 | Extension( | |
@@ -1466,6 +1475,7 b' extmodules = [' | |||||
1466 | 'mercurial/cext/revlog.c', |
|
1475 | 'mercurial/cext/revlog.c', | |
1467 | ], |
|
1476 | ], | |
1468 | include_dirs=common_include_dirs, |
|
1477 | include_dirs=common_include_dirs, | |
|
1478 | extra_compile_args=common_cflags, | |||
1469 | depends=common_depends |
|
1479 | depends=common_depends | |
1470 | + ['mercurial/cext/charencode.h', 'mercurial/cext/revlog.h',], |
|
1480 | + ['mercurial/cext/charencode.h', 'mercurial/cext/revlog.h',], | |
1471 | ), |
|
1481 | ), | |
@@ -1473,7 +1483,7 b' extmodules = [' | |||||
1473 | 'mercurial.cext.osutil', |
|
1483 | 'mercurial.cext.osutil', | |
1474 | ['mercurial/cext/osutil.c'], |
|
1484 | ['mercurial/cext/osutil.c'], | |
1475 | include_dirs=common_include_dirs, |
|
1485 | include_dirs=common_include_dirs, | |
1476 | extra_compile_args=osutil_cflags, |
|
1486 | extra_compile_args=common_cflags + osutil_cflags, | |
1477 | extra_link_args=osutil_ldflags, |
|
1487 | extra_link_args=osutil_ldflags, | |
1478 | depends=common_depends, |
|
1488 | depends=common_depends, | |
1479 | ), |
|
1489 | ), | |
@@ -1482,6 +1492,7 b' extmodules = [' | |||||
1482 | [ |
|
1492 | [ | |
1483 | 'mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c', |
|
1493 | 'mercurial/thirdparty/zope/interface/_zope_interface_coptimizations.c', | |
1484 | ], |
|
1494 | ], | |
|
1495 | extra_compile_args=common_cflags, | |||
1485 | ), |
|
1496 | ), | |
1486 | Extension( |
|
1497 | Extension( | |
1487 | 'mercurial.thirdparty.sha1dc', |
|
1498 | 'mercurial.thirdparty.sha1dc', | |
@@ -1490,9 +1501,12 b' extmodules = [' | |||||
1490 | 'mercurial/thirdparty/sha1dc/lib/sha1.c', |
|
1501 | 'mercurial/thirdparty/sha1dc/lib/sha1.c', | |
1491 | 'mercurial/thirdparty/sha1dc/lib/ubc_check.c', |
|
1502 | 'mercurial/thirdparty/sha1dc/lib/ubc_check.c', | |
1492 | ], |
|
1503 | ], | |
|
1504 | extra_compile_args=common_cflags, | |||
1493 | ), |
|
1505 | ), | |
1494 | Extension( |
|
1506 | Extension( | |
1495 |
'hgext.fsmonitor.pywatchman.bser', |
|
1507 | 'hgext.fsmonitor.pywatchman.bser', | |
|
1508 | ['hgext/fsmonitor/pywatchman/bser.c'], | |||
|
1509 | extra_compile_args=common_cflags, | |||
1496 | ), |
|
1510 | ), | |
1497 | RustStandaloneExtension( |
|
1511 | RustStandaloneExtension( | |
1498 | 'mercurial.rustext', 'hg-cpython', 'librusthg', py3_features='python3' |
|
1512 | 'mercurial.rustext', 'hg-cpython', 'librusthg', py3_features='python3' | |
@@ -1503,11 +1517,11 b' extmodules = [' | |||||
1503 | sys.path.insert(0, 'contrib/python-zstandard') |
|
1517 | sys.path.insert(0, 'contrib/python-zstandard') | |
1504 | import setup_zstd |
|
1518 | import setup_zstd | |
1505 |
|
1519 | |||
1506 | extmodules.append( |
|
1520 | zstd = setup_zstd.get_c_extension( | |
1507 | setup_zstd.get_c_extension( |
|
1521 | name='mercurial.zstd', root=os.path.abspath(os.path.dirname(__file__)) | |
1508 | name='mercurial.zstd', root=os.path.abspath(os.path.dirname(__file__)) |
|
|||
1509 | ) |
|
|||
1510 | ) |
|
1522 | ) | |
|
1523 | zstd.extra_compile_args += common_cflags | |||
|
1524 | extmodules.append(zstd) | |||
1511 |
|
1525 | |||
1512 | try: |
|
1526 | try: | |
1513 | from distutils import cygwinccompiler |
|
1527 | from distutils import cygwinccompiler |
General Comments 0
You need to be logged in to leave comments.
Login now