Comments
Patch
@@ -32,9 +32,9 @@ if '--system-zstd' in sys.argv:
sys.argv.remove('--system-zstd')
if '--warnings-as-errors' in sys.argv:
WARNINGS_AS_ERRORS = True
- sys.argv.remote('--warning-as-errors')
+ sys.argv.remove('--warning-as-errors')
# Code for obtaining the Extension instance is in its own module to
# facilitate reuse in other projects.
extensions = [
@@ -122,8 +122,10 @@ def get_c_extension(support_legacy=False
if compiler.compiler_type == 'unix':
compiler_type = 'unix'
elif compiler.compiler_type == 'msvc':
compiler_type = 'msvc'
+ elif compiler.compiler_type == 'mingw32':
+ compiler_type = 'mingw32'
else:
raise Exception('unhandled compiler type: %s' %
compiler.compiler_type)
@@ -140,9 +142,9 @@ def get_c_extension(support_legacy=False
if not system_zstd and support_legacy:
extra_args.append('-DZSTD_LEGACY_SUPPORT=1')
if warnings_as_errors:
- if compiler_type == 'unix':
+ if compiler_type in ('unix', 'mingw32'):
extra_args.append('-Werror')
elif compiler_type == 'msvc':
extra_args.append('/WX')
else: