summaryrefslogtreecommitdiffstats
path: root/bootstrap.py
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2012-08-03 22:42:44 (GMT)
committerEvan Martin <martine@danga.com>2012-08-10 19:42:34 (GMT)
commit45ca47e10bb4ef3b220a097f324a83daa4f63e94 (patch)
tree08de336241eaa483ef430cc605407410310781d3 /bootstrap.py
parentb00557194b2730bb755f39c79755db885a6afec9 (diff)
downloadNinja-45ca47e10bb4ef3b220a097f324a83daa4f63e94.zip
Ninja-45ca47e10bb4ef3b220a097f324a83daa4f63e94.tar.gz
Ninja-45ca47e10bb4ef3b220a097f324a83daa4f63e94.tar.bz2
add bootstrap option to force 64-bit
Diffstat (limited to 'bootstrap.py')
-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'