summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-09-13 18:07:45 (GMT)
committerEvan Martin <martine@danga.com>2012-09-13 18:11:47 (GMT)
commitc57f8a4258998a185f961ce12fd7c905a3e86180 (patch)
tree8651047b7ac8387f50348b6c37d8c5d6dd8addd4 /configure.py
parentce825d2f6e2bb8a0fa0bb97fe961d5f194f8f6f8 (diff)
downloadNinja-c57f8a4258998a185f961ce12fd7c905a3e86180.zip
Ninja-c57f8a4258998a185f961ce12fd7c905a3e86180.tar.gz
Ninja-c57f8a4258998a185f961ce12fd7c905a3e86180.tar.bz2
windows: merge msvc-helper into ninja.exe itself
Now "ninja -t msvc ..." passes the "..." to the msvc helper main. This drastically simplifies bootstrap and makes ninja a single binary again.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/configure.py b/configure.py
index ca6615c..98274e6 100755
--- a/configure.py
+++ b/configure.py
@@ -45,8 +45,9 @@ parser.add_option('--with-gtest', metavar='PATH',
parser.add_option('--with-python', metavar='EXE',
help='use EXE as the Python interpreter',
default=os.path.basename(sys.executable))
-parser.add_option('--with-msvc-helper', metavar='NAME',
- help="name for ninja-msvc-helper binary (MSVC only)")
+parser.add_option('--with-ninja', metavar='NAME',
+ help="name for ninja binary for -t msvc (MSVC only)",
+ default="ninja")
(options, args) = parser.parse_args()
if args:
print 'ERROR: extra unparsed command-line arguments:', args
@@ -185,8 +186,9 @@ n.newline()
if platform == 'windows':
compiler = '$cxx'
- if options.with_msvc_helper:
- compiler = '%s -o $out -- $cxx /showIncludes' % options.with_msvc_helper
+ if options.with_ninja:
+ compiler = ('%s -t msvc -o $out -- $cxx /showIncludes' %
+ options.with_ninja)
n.rule('cxx',
command='%s $cflags -c $in /Fo$out' % compiler,
depfile='$out.d',
@@ -279,6 +281,7 @@ if platform in ('mingw', 'windows'):
if platform == 'windows':
objs += cxx('includes_normalize-win32')
objs += cxx('msvc_helper-win32')
+ objs += cxx('msvc_helper_main-win32')
objs += cxx('minidump-win32')
objs += cc('getopt')
else:
@@ -303,16 +306,6 @@ ninja = n.build(binary('ninja'), 'link', objs, implicit=ninja_lib,
n.newline()
all_targets += ninja
-if platform == 'windows':
- n.comment('Helper for working with MSVC.')
- msvc_helper = n.build(binary('ninja-msvc-helper'), 'link',
- cxx('msvc_helper_main-win32'),
- implicit=ninja_lib,
- variables=[('libs', libs)])
- n.default(msvc_helper)
- n.newline()
- all_targets += msvc_helper
-
n.comment('Tests all build into ninja_test executable.')
variables = []