Skip to content

Commit

Permalink
setup: support building with mingw compiler
Browse files Browse the repository at this point in the history
Fixes #46
  • Loading branch information
Mike Hommey committed Jun 5, 2018
1 parent c6175cf commit 3f712d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.rst
Expand Up @@ -42,6 +42,7 @@ Other Actions Not Blocking Release
========================

* Debian packaging support.
* Support building with mingw compiler (#46).

0.9.0 (released 2018-04-08)
===========================
Expand Down
4 changes: 3 additions & 1 deletion setup_zstd.py
Expand Up @@ -123,6 +123,8 @@ def get_c_extension(support_legacy=False, system_zstd=False, name='zstd',
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)
Expand All @@ -141,7 +143,7 @@ def get_c_extension(support_legacy=False, system_zstd=False, name='zstd',
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')
Expand Down

0 comments on commit 3f712d7

Please sign in to comment.