diff --git a/setup/extensions.py b/setup/extensions.py index 6e3c7e4836..12c1e435c3 100644 --- a/setup/extensions.py +++ b/setup/extensions.py @@ -6,7 +6,7 @@ __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import textwrap, os, shlex, subprocess, glob, shutil +import textwrap, os, shlex, subprocess, glob, shutil, sys from distutils import sysconfig from multiprocessing import cpu_count @@ -21,6 +21,7 @@ from setup.build_environment import (chmlib_inc_dirs, zlib_libs, zlib_lib_dirs, zlib_inc_dirs) MT isunix = islinux or isosx or isbsd +is64bit = sys.maxsize > 2**32 make = 'make' if isunix else NMAKE @@ -278,6 +279,8 @@ if iswindows: ldflags = '/DLL /nologo /INCREMENTAL:NO /NODEFAULTLIB:libcmt.lib'.split() #cflags = '/c /nologo /Ox /MD /W3 /EHsc /Zi'.split() #ldflags = '/DLL /nologo /INCREMENTAL:NO /DEBUG'.split() + if is64bit: + cflags.append('/GS-') for p in win_inc: cflags.append('-I'+p) diff --git a/setup/installer/windows/notes.rst b/setup/installer/windows/notes.rst index 84300f6804..b4c4c9c09e 100644 --- a/setup/installer/windows/notes.rst +++ b/setup/installer/windows/notes.rst @@ -163,7 +163,7 @@ Now, run configure and make:: -no-plugin-manifests is needed so that loading the plugins does not fail looking for the CRT assembly - configure -ltcg -opensource -release -qt-zlib -qt-libmng -qt-libpng -qt-libtiff -qt-libjpeg -release -platform win32-msvc2008 -no-qt3support -webkit -xmlpatterns -no-phonon -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-declarative -no-scripttools -no-audio-backend -no-multimedia -no-dbus -no-openvg -no-opengl -no-qt3support -confirm-license -nomake examples -nomake demos -nomake docs -no-plugin-manifests -openssl -I $OPENSSL_DIR/include -L $OPENSSL_DIR/lib && nmake + ./configure.exe -ltcg -opensource -release -qt-zlib -qt-libmng -qt-libpng -qt-libtiff -qt-libjpeg -release -platform win32-msvc2008 -no-qt3support -webkit -xmlpatterns -no-phonon -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-declarative -no-scripttools -no-audio-backend -no-multimedia -no-dbus -no-openvg -no-opengl -no-qt3support -confirm-license -nomake examples -nomake demos -nomake docs -nomake tools -no-plugin-manifests -openssl -I $OPENSSL_DIR/include -L $OPENSSL_DIR/lib && nmake Add the path to the bin folder inside the Qt dir to your system PATH.