summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-23 02:24:25 (GMT)
committerGitHub <noreply@github.com>2020-04-23 02:24:25 (GMT)
commit0b7829e089f9f93e1387f240ae03d42ac7cd77c7 (patch)
tree1f986441465a7649579e09b57f4d5497eebf1d3c /Tools
parent1def7754b7a41fe57efafaf5eff24cfa15353444 (diff)
downloadcpython-0b7829e089f9f93e1387f240ae03d42ac7cd77c7.zip
cpython-0b7829e089f9f93e1387f240ae03d42ac7cd77c7.tar.gz
cpython-0b7829e089f9f93e1387f240ae03d42ac7cd77c7.tar.bz2
Compile extensions in test_peg_generator with C99 (GH-19668)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/peg_generator/pegen/build.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tools/peg_generator/pegen/build.py b/Tools/peg_generator/pegen/build.py
index 623b4ae..c66dc7e 100644
--- a/Tools/peg_generator/pegen/build.py
+++ b/Tools/peg_generator/pegen/build.py
@@ -1,6 +1,7 @@
import pathlib
import shutil
import tokenize
+import sys
from typing import Optional, Tuple
@@ -42,6 +43,8 @@ def compile_c_extension(
source_file_path = pathlib.Path(generated_source_path)
extension_name = source_file_path.stem
extra_compile_args = []
+ if not sys.platform.startswith('win'):
+ extra_compile_args.append("-std=c99")
if keep_asserts:
extra_compile_args.append("-UNDEBUG")
extension = [