comparison contrib/python-zstandard/setup_zstd.py @ 38186:c0081d3e1598 stable

zstandard: pull in bug fixes from upstream 0.9.1 release (issue5884) This changeset contains the meaningful code changes from python-zstandard's 0.9.1 release. The main fix is to restore support for compiling with mingw.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 06 Jun 2018 09:14:33 -0700
parents b1fb341d8a61
children 73fef626dae3
comparison
equal deleted inserted replaced
38185:3277940a935f 38186:c0081d3e1598
121 121
122 if compiler.compiler_type == 'unix': 122 if compiler.compiler_type == 'unix':
123 compiler_type = 'unix' 123 compiler_type = 'unix'
124 elif compiler.compiler_type == 'msvc': 124 elif compiler.compiler_type == 'msvc':
125 compiler_type = 'msvc' 125 compiler_type = 'msvc'
126 elif compiler.compiler_type == 'mingw32':
127 compiler_type = 'mingw32'
126 else: 128 else:
127 raise Exception('unhandled compiler type: %s' % 129 raise Exception('unhandled compiler type: %s' %
128 compiler.compiler_type) 130 compiler.compiler_type)
129 131
130 extra_args = ['-DZSTD_MULTITHREAD'] 132 extra_args = ['-DZSTD_MULTITHREAD']
139 141
140 if not system_zstd and support_legacy: 142 if not system_zstd and support_legacy:
141 extra_args.append('-DZSTD_LEGACY_SUPPORT=1') 143 extra_args.append('-DZSTD_LEGACY_SUPPORT=1')
142 144
143 if warnings_as_errors: 145 if warnings_as_errors:
144 if compiler_type == 'unix': 146 if compiler_type in ('unix', 'mingw32'):
145 extra_args.append('-Werror') 147 extra_args.append('-Werror')
146 elif compiler_type == 'msvc': 148 elif compiler_type == 'msvc':
147 extra_args.append('/WX') 149 extra_args.append('/WX')
148 else: 150 else:
149 assert False 151 assert False