diff options
author | David Cournapeau <cournape@gmail.com> | 2008-12-19 09:55:16 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-12-19 09:55:16 +0000 |
commit | 14a63a81f6dfed3390dfef8f3cb0a173524f24f0 (patch) | |
tree | 8b1f2ce67399c874ba1780f5feb6e9ef3a075435 /numpy/distutils/command/build_ext.py | |
parent | 94e3d100720ba4fd150d9fb1993838377eb8c243 (diff) | |
download | numpy-14a63a81f6dfed3390dfef8f3cb0a173524f24f0.tar.gz |
Add MS_WIN64 macro when built on amd64 + mingw.
Diffstat (limited to 'numpy/distutils/command/build_ext.py')
-rw-r--r-- | numpy/distutils/command/build_ext.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py index 3092167c6..5ad8c7fef 100644 --- a/numpy/distutils/command/build_ext.py +++ b/numpy/distutils/command/build_ext.py @@ -278,6 +278,14 @@ class build_ext (old_build_ext): c_sources += cxx_sources cxx_sources = [] + # MS_WIN64 should be defined when building for amd64 on windows, but + # python headers define it only for MS compilers, which has all kind of + # bad consequences, like using Py_ModuleInit4 instead of + # Py_ModuleInit4_64, etc... So we add it here + if self.compiler.compiler_type == 'mingw32' and \ + get_build_architecture() == 'AMD64': + macros.append('MS_WIN64') + # Set Fortran/C++ compilers for compilation and linking. if ext.language=='f90': fcompiler = self._f90_compiler |