Skip to content

Commit

Permalink
add bootstrap option to force 64-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mwoehlke-kitware authored and evmar committed Aug 10, 2012
1 parent b005571 commit 45ca47e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
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):
Expand Down Expand Up @@ -74,15 +76,21 @@ def run(*args, **kwargs):

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',
'-DNINJA_PYTHON="' + sys.executable + '"',
'-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'
Expand Down

0 comments on commit 45ca47e

Please sign in to comment.