Commit Graph

193 Commits

Author SHA1 Message Date
Refael Ackermann
d560c62cae Need this to build on vs2017
.\src\clparser.cc(56): note: see reference to function template instantiation '_OutIt std::transform<std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,int(__cdecl *)(int)>(_InIt,_InIt,_OutIt,_Fn1)' being compiled
        with
        [
            _OutIt=std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,
            _InIt=std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,
            _Fn1=int (__cdecl *)(int)
        ]
D:\bin\dev\VS\2017\BuildTools\VC\Tools\MSVC\14.10.24911\include\algorithm(946): warning C4244: '=': conversion from 'int' to 'char', possible loss of data
2017-02-04 18:38:20 -05:00
Pietro Cerutti
68cf75583d FreeBSD supports ppoll(2) 2016-09-15 12:20:35 +00:00
Nico Weber
3a88912624 Make deps=msvc experimentally available on non-Windows.
This makes it possible to run most of the clparser tests on non-Windows,
and is potentially useful for cross-compiling on non-Windows hosts.
Also, the manual didn't document this as Windows-only previously.

If you use this on non-Windows, please let me know, else I might undo
this change again in the future.
2016-04-05 21:08:32 -04:00
Nico Weber
bc4f7bf752 Merge pull request #1106 from nico/winfix
win: Only drop /showIncludes in bootstrap builds.
2016-02-05 16:26:52 -05:00
Nico Weber
2f127fab68 win: Only drop /showIncludes in bootstrap builds.
Fixes #1103.
2016-02-05 13:28:56 -05:00
Frank Benkstein
ab652787de MSVC: disable warning about constant conditional expressions
The standard headers for Visual Studio 2008 generate a warning about
constant conditional expressions when compiled with exception support
disabled.  This is caused by the _CATCH_ALL macro in xstddef which is
defined thusly:

  #ifdef _HAS_EXCEPTIONS
  #define _CATCH_ALL } catch (...) {
  #else
  #define _CATCH_ALL } if (0) {
  #endif
2016-02-05 14:56:53 +01:00
sphawk
eb1a4fb489 fix for localized version of cl.exe 2016-01-25 22:43:14 +09:00
Evan Martin
a1159ff0d5 when building with cwd = source root, use relative paths
The pull request that introduced building from a directory other
than the source dir, https://github.com/ninja-build/ninja/pull/979,
made it so all source paths are effectively absolute paths.  This
change restores the old behavior in the case when you are building
in the source.  See the comments there.
2015-11-17 14:42:12 -08:00
Evan Martin
4243257288 rename the build-file variable $sourcedir to $root
Confusingly, $sourcedir is the path to the root of the repository,
*not* the path to the src/ directory.
2015-11-17 14:42:12 -08:00
Evan Martin
3be9710589 put warning flags together 2015-11-17 14:42:12 -08:00
Evan Martin
a6859ac8af improve docs generation, including PDF output
- Fix the manual build rules (missing the .xsl as an input).
- Add a README describing how the docs build works.
- Add rules that generate PDF, just 'cause we can.
2015-11-17 14:05:53 -08:00
Evan Martin
4ffe56d387 Merge pull request #1007 from mikesep/aix
Support for AIX
2015-11-11 17:19:00 -08:00
Nico Weber
805875b44a Try to fix #685 2015-11-11 13:54:14 -08:00
Mike Seplowitz
aa14d6e067 Separate bootstrapped build from final build
AIX does not support rebuilding ninja in-place from the bootstrapped ninja.
2015-10-22 10:05:44 -04:00
Scott Graham
b8f4ad12c0 Don't output null.o during configure 2015-08-26 19:51:15 -07:00
Mike Seplowitz
cdab57de00 Fix getopt for AIX
AIX supplies getopt but not getopt_long.

We can't use the embedded getopt implementation, since the constness of its
arguments doesn't match the AIX system routine.
2015-08-19 08:43:59 -04:00
Mike Seplowitz
94c10a6a18 Implement GetLoadAverage on AIX using libperfstat 2015-08-19 08:43:58 -04:00
Mike Seplowitz
da4e98b715 Start AIX port 2015-08-19 08:42:06 -04:00
Scott Graham
a4327b9fb0 Set _HAS_EXCEPTIONS=0 on MSVC 2015-08-09 21:02:23 -07:00
Jason Haslam
5d4473d548 Fix bootstrap from a source path containing spaces. 2015-06-22 16:28:04 -06:00
Jason Haslam
d3441a0338 Search for generated headers relative to build dir. 2015-06-22 15:35:32 -06:00
Jason Haslam
1beea932bc Allow configure script to bootstrap out of source. 2015-06-22 15:35:32 -06:00
Nico Weber
4256ff44d9 Revert "Bootstrap out of source" 2015-06-22 13:35:37 -07:00
Jason Haslam
681f761da1 Search for generated headers relative to build dir. 2015-05-26 16:47:18 -06:00
Jason Haslam
78b1e52a5d Allow configure script to bootstrap out of source. 2015-05-26 15:19:28 -06:00
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