summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/bootstrap.py b/bootstrap.py
index a5df22a..e2aa866 100755
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -26,6 +26,8 @@ os.chdir(os.path.dirname(os.path.abspath(__file__)))
parser = OptionParser()
parser.add_option('--verbose', action='store_true',
help='enable verbose build',)
+parser.add_option('--x64', action='store_true',
+ help='force 64-bit build (Windows)',)
(options, conf_args) = parser.parse_args()
def run(*args, **kwargs):
@@ -74,8 +76,12 @@ if sys.platform.startswith('win32'):
vcdir = os.environ.get('VCINSTALLDIR')
if vcdir:
- args = [os.path.join(vcdir, 'bin', 'cl.exe'),
- '/nologo', '/EHsc', '/DNOMINMAX']
+ if options.x64:
+ args = [os.path.join(vcdir, 'bin', 'amd64', 'cl.exe'),
+ '/nologo', '/EHsc', '/DNOMINMAX']
+ else:
+ args = [os.path.join(vcdir, 'bin', 'cl.exe'),
+ '/nologo', '/EHsc', '/DNOMINMAX']
else:
args = shlex.split(os.environ.get('CXX', 'g++'))
cflags.extend(['-Wno-deprecated',
@@ -83,6 +89,8 @@ else:
'-DNINJA_BOOTSTRAP'])
if sys.platform.startswith('win32'):
cflags.append('-D_WIN32_WINNT=0x0501')
+ if options.x64:
+ cflags.append('-m64')
args.extend(cflags)
args.extend(ldflags)
binary = 'ninja.bootstrap'