Compile extensions in test_peg_generator with C99 (GH-19668)

This commit is contained in:
Pablo Galindo 2020-04-23 03:24:25 +01:00 committed by GitHub
parent 1def7754b7
commit 0b7829e089
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 14 deletions

View file

@ -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 = [