Commit Graph

168 Commits

Author SHA1 Message Date
Nico Weber
7ed4457f3b Remove option no longer needed now that we don't use gtest. 2015-03-10 13:45:17 -07:00
Nico Weber
51f06facf4 Simplify. No behavior change. 2015-03-10 09:09:49 -07:00
Nico Weber
00a061cde9 Make diagnostics colored with new gccs (4.9+) too.
Both clang and gcc understand -fdiagnostics-color, so use that flag name.
(This will disable colored diagnostics for clangs older than LLVM 3.3,
but that is several years old by now.)
2015-03-09 10:24:41 -07:00
Ryan Gonzalez
160af7d034 Test for Clang by checking --version 2015-03-08 19:09:01 -05:00
Beren Minor
d1e6a29fd3 Fix compilation errors on Visual Studio 2015 (_MSC_VER 1900). 2014-12-31 12:17:21 +01:00
Ben Boeckel
54d82356d8 configure: add a verbose mode
Required for Fedora infrastructure so that the commands used to build
ninja are logged.
2014-12-10 23:09:38 -05:00
Nico Weber
475918a513 Make configure.py work with Python. Fixes issue #877.
Patch from @TheOneRing!
2014-12-03 08:11:33 -08:00
Nico Weber
13bd84f0ac Fix Windows build after #862. Thanks to @harig for the report. 2014-11-22 11:43:33 -08:00
Nico Weber
76bdba6c3e Merge pull request #862 from nico/browse
Make browse detection consistent with other platform checks.
2014-11-21 18:24:03 -08:00
Nico Weber
9870d3bc73 Remove now-unused variable test_libs. 2014-11-21 18:18:30 -08:00
Nico Weber
2af5eef7c7 Stop linking pthread.
It was only needed by gtest, which is no longer used.
(Intesting note: I checked when the -lpthread flag was added, and it's
been around since the first revision of build.ninja, which used to be
checked in before configure.py existed. Back then, it looks like '@' was
used to dereference built-in variables, and build outputs were also
prefixed by '@'!).
2014-11-21 18:15:35 -08:00
Nico Weber
0bf1bd3f8e Make browse detection consistent with other platform checks. 2014-11-20 16:56:17 -08:00
Nico Weber
e1f1a2cf65 Remove duplicate import. No behavior change. 2014-11-20 16:46:52 -08:00
Evan Martin
684bf3815e merge platform_helper into configure script
With this code all in one place, it's easier to spot unused code and
simplification opportunities.
2014-11-18 11:37:12 -08:00
Evan Martin
dcd41dcef3 add a --bootstrap mode for configure.py
Instead of bootstrapping through a separate script, instead make
configure.py able to either generate a build.ninja *or* just execute
all the computed commands to build a ninja binary.
2014-11-18 08:15:37 -08:00
Nico Weber
4daf9c9e83 Merge pull request #842 from nico/solaris
Fix building on Solaris.
2014-11-13 17:57:53 -08:00
Nico Weber
a39b9577ba Make sure configure.py and ninja.cc always agree on if -t browse is included.
No behavior change on most platforms. On solaris, -t browse was compiled in
in ninja.cc but browse.cc wasn't compiled in, which probably means that building
on Solaris didn't work. It might be better now.

This also makes browse.cc automatically not included in bootstrap builds;
previously this was done manually through the NINJA_BOOTSTRAP check.
2014-11-13 17:54:05 -08:00
Nico Weber
2c241d7616 Remove unused variables. 2014-11-13 17:31:37 -08:00
Nico Weber
fa62cd4c47 Fix building on Solaris.
"SunOS" and "Solaris" are the same thing these days, so make them go
down the same code paths. In particular, the browse feature was omitted
on solaris but not sunos5, causing trouble for some folks (see #838).
2014-11-01 12:20:42 -07:00
Nico Weber
13dfea4f8d Make auto-reconfiguring work if CFLAGS contains more than one flag.
When using an open-source clang on OS X, one has to pass an isysroot
flag so that it can find system headers (stdio.h), like so:

  CXX=path/to/clang++ CFLAGS="-isysroot $(xcrun -show-sdk-path)" ./configure.py

Previously, configure.py wouldn't quote envvars containing spaces, so
it'd rerun this as

  CXX=path/to/clang++ CFLAGS=-isysroot /sysroot/path ./configure.py

which would then die because /sysroot/path wasn't excecutable.
2014-09-19 08:50:24 -07:00
Nico Weber
b2fe56caaf Use a small, standalone testing framework instead of googletest.
Ninja currently uses googletest for testing. That makes building
ninja_test somewhat annoying since it requires that one passes
--with-gtest PATH to configure. It turns out just implementing the bits
of googletest that ninja uses needs about the same amount of code than
making the --with-gtest flag in configure.py work and making googletest
print test results in a way we want (!)

In addition to making configuration simpler, this also makes compiling
tests much faster: On my system, touching src/build_test.cc (the slowest
file to build in ninja) and rebuilding ninja_tests is twice as fast than
without this patch. Building all is noticeably faster too: 5.6s with
this patch, 9.1s without this patch (38% faster).

The most noticeable things missing: EXPECT_* and ASSERT_* don't support
streaming notes to them with operator<<, and for failing tests the lhs
and rhs are not printed. That's so that this header does not have to
include sstream, which slows down building ninja_test almost 20%.
If this turns out to be annoying, we can maybe add it.
2014-09-17 19:48:26 -07:00
Nico Weber
ef647f1e94 create a slightly nicer build.ninja on windows 2014-06-14 22:47:05 -07:00
Nico Weber
993803ed2a Add a simple manifest parsing perftest. 2014-04-16 22:06:56 -07:00
Nico Weber
68a4bb27d1 Rename parser_perftest to depfile_parser_perftest. 2014-04-15 17:43:03 -07:00
Nicholas Hutchinson
c0b1e4d75e configure.py: use /FS flag under vs2013 when compiling gtest 2014-01-09 15:36:57 +13:00
Nico Weber
3aa641ec82 Wrap to 79 colums. No functionality change. 2013-10-26 20:15:23 -07:00
Scott Graham
a90b279e46 Fix compilation on VS2013 2013-10-17 21:12:11 -07:00
Scott Graham
cc89c1aaec add -d keeprsp to preserve @rsp files on success on windows 2013-09-10 15:34:01 -07:00
David Hill
cb85ce886d cleanup based on comments from martine 2013-06-29 19:16:51 -04:00
David Hill
7b9b1fb94a support Bitrig 2013-06-29 17:34:51 -04:00
Tobias Hieta
4db8e5ddf0 Added bootstrap/configure option to force pselect
All modern Linux kernels have ppoll() but sometimes
you might want to compile on something ancient.

This patch adds the possibility to force the use
of pselect() instead by passing --force-pselect
to bootstrap/configure.

The use of ppoll() is still default for Linux
and OpenBSD
2013-05-23 13:12:53 +00:00
Evan Martin
43c33d7309 require version 1.3 for building ninja itself
This catches the case where you use an older version on Ninja
to build a newer version of the Ninja code.
bootstrap.py always should work regardless.
2013-05-17 08:32:04 -07:00
Patrick von Reth
4c552c2c3c share platform support between configure/bootstrap 2013-04-30 08:30:29 -07:00
Evan Martin
c5114830b8 fix --profile=pprof on newer ubuntus
The --as-needed default for ld would drop -lprofiler.
2013-04-17 17:15:36 -07:00
Scott Graham
84b629e474 try again on vs2012 build fixes 2013-04-10 20:16:24 -07:00
Evan Martin
461fec29aa build ninja itself in deps mode
Hopefully will help flush out bugs.
2013-04-10 12:51:04 -07:00
Evan Martin
8b9e3eaf7e Merge branch 'dep-pipeless'
This merges a new mechanism for tracking "depfile" dependencies that
is faster on all platforms but dramatically so on Windows.
2013-04-09 08:57:02 -07:00
Nico Weber
10d1c939ae move single-line printing to new class 2013-04-08 21:11:27 -07:00
Nico Weber
94f999b681 Make gtest output more silent, ninja issue #528.
This is just a proof-of-concept. The terminal printing logic should be
extracted from src/build.cc and then reused here.
2013-04-08 18:02:05 -07:00
Evan Martin
a8d7d8163a rename "special" to "deps" 2013-04-08 15:02:15 -07:00
Evan Martin
58c7139b9f windows: drop use of msvc helper in build 2013-04-08 15:01:35 -07:00
Evan Martin
b6a9a1c8ad add DepsLog, a new data structure for dependency information
DepsLog is a compact serialization of dependency information.
It can be used to replace depfiles for faster loading.
2013-04-08 14:45:06 -07:00
Evan Martin
d3c4cf1b36 move from asciidoc html to asciidoc -> docbook -> html
As best as I can tell this is the easiest way to customize
the asciidoc HTML output.
2013-02-16 17:13:10 -08:00
Evan Martin
10f3e17b6d add syntax for checking versions 2013-02-16 15:15:20 -08:00
Evan Martin
37b5ac7a1a always set GTEST_HAS_RTTI=0 in all testing code 2012-12-29 16:42:10 -08:00
Evan Martin
3249938cdf wrap some overlong lines 2012-12-29 12:33:15 -08:00
Evan Martin
a29686ea9c fix test build under clang/system gtest
Tests always need GTEST_HAS_RTTI=0 set, but the code was only
setting it in the --with-gtest branch.  Instead always use the
test-specific cflags when compiling test code.
2012-12-29 00:37:25 -08:00
Zaheer Chothia
f4b1133d5c Python scripts: use built-in print function. 2012-10-19 09:46:09 +02:00
Zaheer Chothia
1d5daecfaf Add support for Python 3 2012-10-18 15:03:20 +02:00
Martin Olsson
39aac33692 Fix two spelling errors 2012-10-03 10:10:53 +02:00