2382 Commits

Author SHA1 Message Date
Takuto Ikuta
08a3220bc2 Add string_piece_util
Following functions are implemented for further performance
optimization.

* JoinStringPiece
* SplitStringPiece
* EqualsCaseInsensitiveASCII
* ToLowerASCII

To improve performance of CLParser, I will introduce above functions
into include_normalize-win32.cc.
2017-04-26 17:27:54 +09:00
Nico Weber
586bb6daef Merge pull request #1267 from atetubou/clparser_perftest
Add clparser_perftest
2017-04-17 13:50:24 -04:00
Takuto Ikuta
5a03f4e34a delete n 2017-04-12 13:44:02 +09:00
Takuto Ikuta
03d0a8befe use us 2017-04-12 13:42:15 +09:00
Takuto Ikuta
12ca62107d add gitignore 2017-04-12 13:39:07 +09:00
Takuto Ikuta
4eac806a44 remove util.h 2017-04-12 13:33:45 +09:00
Takuto Ikuta
292c89f486 Add clparser_perftest 2017-04-12 11:12:38 +09:00
Nico Weber
0b0374e831 Merge pull request #1255 from tchajed/bind-localhost
browse: Bind to localhost by default
2017-03-10 17:42:27 -05:00
Tej Chajed
8a32d21b67
browse: Bind to localhost by default
Previously the browse server would bind to "", which is translated to
0.0.0.0 (all interfaces), and then the hostname as retrieved by
socket.gethostname() was presented to the user.

The hostname is now "localhost" by default and is configurable, so the
original behavior is achieved with `ninja -t browse -a ""`.
2017-03-09 13:57:22 -05:00
Nico Weber
fb3c70049b Merge pull request #1231 from colincross/canon_perftest_fix
Fix build in canon_perftest_fix
2017-02-10 13:55:14 -08:00
Nico Weber
1df8b6e47c Merge pull request #1235 from refack/patch-1
Suppress warning 4244 to bootstrap on vs2017
2017-02-10 13:17:37 -08:00
Nico Weber
f4ea9ca2f2 Merge pull request #1232 from nicolasdespres/fix-canon_perftest
Fix compilation error in canon_perftest.
2017-02-10 13:16:33 -08:00
Nico Weber
4dc4f1dee9 Merge pull request #1237 from danw/no_reload_with_restat
Support restat when rebuilding manifest
2017-02-10 13:14:46 -08:00
Dan Willemsen
abcd5f3d4d Support restat when rebuilding manifest
As a fix for #874, we started reloading the entire manifest even if the
manifest was never rebuilt due to a restat rule. But this can be slow,
so call State::Reset instead, which also fixes the original crash.

Fixes #987
2017-02-07 16:07:14 -08:00
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
Nicolas Despres
d6ff22b506 Fix compilation error in canon_perftest.
Introduced by 1cc730ddc27df52.
2017-02-02 15:28:20 +13:00
Colin Cross
d611bd405a Make travis build everything
Tell travis to build "all" instead of just "ninja_test".  This would
have caught the breakage introduced by #1181.
2017-02-01 16:51:38 -08:00
Colin Cross
110dae2209 Fix build in canon_perftest_fix
unsigned int*, make the same change in canon_perftest.

Fixes "./ninja all" build.
2017-02-01 16:51:16 -08:00
Nico Weber
2993752dd6 Merge pull request #1181 from DanielWeber/issue-1161
Allow more path components
2017-01-24 14:03:50 -05:00
Nico Weber
9e71431e6f Merge pull request #1226 from colincross/close-fds
Close original pipe fd in subprocesses
2017-01-13 11:04:43 -05:00
Colin Cross
dd2b587e28 Close original pipe fd in subprocesses
Non-console subprocesses have the write end of a pipe connected to fds
1 and 2 for stdout and stderr, but they also have the it connected to
whatever fd was assigned in the ninja process when the pipe was
created.  Add a call to posix_spawn_file_actions_addclose after
the posix_spawn_file_actions_adddup2 calls to close the original fd
once it has been dup'd to stdout and stderr.

This fixes an issue seen in the Android build, where one of the
subprocesses is used to start a background helper process.  The
background process attempts to close any inherited fds, but if ninja
used a very large fd number due to a high parallelism count the
background process would not close the fd and ninja would never
consider the subprocess finished.
2017-01-12 20:59:31 -08:00
Evan Martin
a36f96c0a5 Merge pull request #1225 from bippum/patch-1
fix broken link in hacking.md
2017-01-11 17:09:16 -08:00
Brendan McCarthy
29ea8ea26c fix broken link in hacking.md 2017-01-11 15:52:20 -05:00
Nico Weber
95ddaa14ea Merge pull request #1220 from phajdan/master
Fix build with uclibc
2017-01-08 16:21:50 -05:00
Pawel Hajdan, Jr
76abf78aac Fix build with uclibc
Resolves #985

This is based on musl implementation,
http://git.musl-libc.org/cgit/musl/commit/?id=20cbd607759038dca57f84ef7e7b5d44a3088574
(thanks to jbergstroem@ for reference)
2017-01-02 10:42:35 +00:00
Nico Weber
7d705a3dfc Merge pull request #1213 from nico/copying
replace copyright placeholder, fixes #1212
2016-12-06 17:20:30 -05:00
Nico Weber
78f893bdbb replace copyright placeholder, fixes #1212 2016-12-06 17:19:32 -05:00
Nico Weber
3082aa69b7 Merge pull request #1206 from nico/versioninfo
windows: replace deprecated GetVersionEx with recommended replacement
2016-11-07 20:49:45 -08:00
Nico Weber
32c82da13e windows: replace deprecated GetVersionEx with recommended replacement
The recommended replacement VerifyVersionInfo should work with the same
SDKs that GetVersionEx worked with (while the wrappers in
VersionHelpers.h require a recent SDK).  This patch should not change
behavior, and it's not supposed to increase build requirements.  If
this makes things harder to build, please let me know.
2016-11-07 23:36:32 -05:00
Nico Weber
2263f82bea Merge pull request #1205 from nico/clangclformat
fix a clang-cl -Wformat warning
2016-11-07 19:20:24 -08:00
Nico Weber
32c3625649 fix a clang-cl -Wformat warning 2016-11-07 22:19:06 -05:00
Nico Weber
a232a7f85e Merge pull request #1204 from nico/vernum
fix RELEASING wrt manual.asciidoc process
2016-11-07 19:01:17 -08:00
Nico Weber
14f47940af fix RELEASING wrt manual.asciidoc process 2016-11-07 22:00:33 -05:00
Nico Weber
fdfff1127a Merge pull request #1194 from ilor/depfile-empty-path
Improve error message when a depfile contains a bad path
2016-11-07 16:23:33 -08:00
Nico Weber
21fc1203c1 Merge pull request #1182 from moosotc/master
Use POSIX_SPAWN_USEVFORK if available
2016-11-07 16:08:50 -08:00
Nico Weber
ef0616e3e4 Merge pull request #1203 from nico/reldoc
Update RELEASING -- manual.asciidoc no longer has a version number
2016-11-07 15:48:31 -08:00
Nico Weber
474e87d4f3 Update RELEASING -- manual.asciidoc no longer has a version number 2016-11-07 15:47:44 -08:00
Nico Weber
04f4bc5dbb Merge pull request #1201 from nico/singlecommand
teach -t commands to optionally print only the final command
2016-11-07 13:42:46 -08:00
Nico Weber
b0cce09f56 mark this 1.7.2.git 2016-11-07 10:28:51 -08:00
Nico Weber
4f759e9667 Merge pull request #1202 from nico/ppollbsd
Only run SubprocessTest.SetWithLots on FreeBSD when ppoll() exists.
2016-11-07 10:22:53 -08:00
Nico Weber
82a68c96f4 Only run SubprocessTest.SetWithLots on FreeBSD when ppoll() exists.
Should fix #1189 after #1185.
2016-11-07 10:17:08 -08:00
Nico Weber
7cffca2972 Merge pull request #1198 from jamesr/fix_write_fake_manifests
Fix syntax error in misc/write_fake_manifests.py
2016-11-07 09:22:34 -08:00
Nico Weber
b7bac03427 Merge pull request #1192 from sgraham/tidy-snprintf
Tidy up rate snprintf'ing helper
2016-11-06 12:27:46 -08:00
Nico Weber
8b7155b0e5 teach -t commands to optionally print only the final command 2016-11-06 12:20:24 -08:00
James Robinson
61c6884335 Fix syntax error in misc/write_fake_manifests.py
This is used by manifest_parser_perftest
2016-10-24 17:12:05 -07:00
Tomasz Śniatowski
46d9a958fa Improve error message when a depfile contains a bad path
Debugging "ninja: error: empty path" is not fun, so make the error
message mention the depfile name.
2016-10-12 14:09:28 +02:00
Scott Graham
05d60b58ab Tidy up rate snprintf'ing helper 2016-10-07 15:29:58 -07:00
Nico Weber
6a2b876d3a Merge pull request #1109 from fbenkstein/enhance_write_fake_manifest
enhance write_fake_manifest.py
2016-09-22 09:35:31 -04:00
Nico Weber
067e187a7f Merge pull request #1185 from gahr/freebsd-ppoll
FreeBSD supports ppoll(2)
2016-09-20 13:22:31 -04:00
Pietro Cerutti
965e549b8d Disable ppoll(2) on FreeBSD < 10.2 2016-09-20 10:52:56 +00:00