summaryrefslogtreecommitdiff
path: root/buildutils/misc.py
blob: 77f843bac59465932659140387b0c7d47d4abe22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""misc build utility functions"""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.

def customize_mingw(cc):
    # strip -mno-cygwin from mingw32 (Python Issue #12641)
    for cmd in [cc.compiler, cc.compiler_cxx, cc.compiler_so, cc.linker_exe, cc.linker_so]:
        if '-mno-cygwin' in cmd:
            cmd.remove('-mno-cygwin')
    
    # remove problematic msvcr90
    if 'msvcr90' in cc.dll_libraries:
        cc.dll_libraries.remove('msvcr90')

__all__ = ['customize_mingw']