2398 Commits

Author SHA1 Message Date
Jan Niklas Hasse
d849e8fc85 AppVeyor: Also build with MinGW 2018-11-02 10:46:42 +01:00
Jan Niklas Hasse
f6971c9139
Merge pull request #1472 from Hi-Angel/master
Fix wrong description of script installation
2018-11-02 09:20:28 +01:00
Jan Niklas Hasse
3400ae9f21
Merge pull request #1299 from pcc/fflush
Flush stdout after printing "Cleaning..." message
2018-10-30 11:16:41 +01:00
Andrew Maclean
cadcfc19ba Add more instructions for building ninja in Windows (#1169)
This should clarify that the instructions are for Visual Studio.
It also opens the possibility for others to write similar sections for using gcc/clang in Windows.
2018-10-30 11:12:13 +01:00
Jan Niklas Hasse
f95652d587
Merge pull request #1481 from rickysarraf/fix-testcase-whoami
Fix testcase failure in docker environment
2018-10-29 20:18:50 +01:00
Jan Niklas Hasse
3eb9cd2f88
Merge pull request #1485 from nomis/freebsd-11
Fix compilation on FreeBSD 11.2 (use st_mtim.tv_nsec)
2018-10-29 20:13:17 +01:00
Jan Niklas Hasse
590a0e9768
Merge pull request #1350 from korli/posix_spawn_errno
posix_spawn_* calls don't set errno, use the return value.
2018-10-29 18:31:18 +01:00
Jan Niklas Hasse
812250db0b
Merge pull request #1430 from whereswaldon/patch-1
Fix simple typo in HACKING.md
2018-10-29 17:31:46 +01:00
Simon Arlott
febd3b3761
Fix compilation on FreeBSD 11.2 (use st_mtim.tv_nsec)
./src/disk_interface.cc: In member function 'virtual TimeStamp RealDiskInterface::Stat(const string&, std::__cxx11::string*) const':
./src/disk_interface.cc:216:51: error: 'struct stat' has no member named 'st_mtimensec'; did you mean 'st_mtim'?
   return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
                                                   ^~~~~~~~~~~~
                                                   st_mtim
2018-10-25 20:50:27 +01:00
Nico Weber
fccab7408a
Merge pull request #1417 from stefanb2/topic-silence-gcc-fallthrough-warnings
Silence GCC -Wimplicit-fallthrough warnings
2018-10-24 08:34:43 -07:00
Nico Weber
d2045dedc3
Merge pull request #1467 from cdluminate/master
Misc typo fixes by https://github.com/codespell-project/codespell/
2018-10-24 07:39:42 -07:00
Ritesh Raj Sarraf
74f0355d8a
Replace whoami with a more generic command
In our docker environment, the normal user does not have a name.
This results in the `whoami` command to fail which expects a name to print

Replace `whoami` with `id -u`, which print print the numeric id

I have no name!@7427761b8f4c:/tmp/d$ whoami
whoami: cannot find name for user ID 1000
I have no name!@7427761b8f4c:/tmp/d$ id
uid=1000 gid=0(root) groups=0(root)

Signed-off-by: Ritesh Raj Sarraf <ritesh.sarraf@collabora.com>
2018-10-12 20:56:43 +05:30
Konstantin Kharlamov
957d1990b6
Fix wrong description of script installation
The described way of installation makes zsh fail with `_arguments:comparguments:325: can only be called from completion function`. Per [zsh documentation](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org#telling-zsh-which-function-to-use-for-completing-a-command) the correct way is to use `$fpath`.
2018-09-28 15:22:46 +03:00
Mo Zhou
33448c830b Misc typo fixes by https://github.com/codespell-project/codespell/ 2018-09-06 04:09:48 +00:00
Christopher Waldon
eb52bed89b
Fix simple typo in HACKING.md 2018-04-24 23:52:58 -04:00
Stefan Becker
08ef815c7b Add NINJA_FALLTHROUGH macro
Borrow macro implementation from OpenSSL code.

Add the macro after each fallthrough switch case to indicate our
intention to the compiler. This silences GCC -Wimplicit-fallthrough
warnings, which is implied by GCC 7.x -Wextra.
2018-04-11 08:45:54 +03:00
Nico Weber
ca041d88f4
Merge pull request #1421 from moroten/revert-for-appveyor-1
Revert "Fix stat when subdirectory is a file"
2018-04-10 08:20:46 -04:00
Fredrik Medley
49626c3610 Revert "Fix stat when subdirectory is a file"
This reverts commit 6c864097ef11da366fb4070e6ab9f34d6a293766
and fixes the broken Appveyor builds on GitHub.
2018-04-09 21:46:07 +02:00
Nico Weber
265a6eaf39 rename a variable 2018-04-06 12:58:01 -04:00
Nico Weber
660d628da8
Merge pull request #1415 from nico/readident
Improve location of error messages around identifiers.
2018-04-06 12:53:10 -04:00
Nico Weber
001b1e3cf0 Improve location of error messages around identifiers.
Lexer::ReadIdent() now sets last_token_ before returning, like
Lexer::ReadEvalString() does. So all "expected identifiers" and things
that call ReadIdent (pool parser, rule parser, let parser, code parsing
the rule name after a : in a build line) now point the "^ near here" at
what was there instead of the previous last_token

According to manifest_parser_perftest, this is perf-neutral.
2018-04-06 12:45:32 -04:00
Nico Weber
cf34abf3d2
Merge pull request #1409 from atetubou/appveyor
Add appveyor.yml for build & test on windows
2018-04-06 09:48:15 -04:00
Nico Weber
9f38904da4
Merge pull request #1410 from ryandesign/configure.py-CXXFLAGS
Honor CXXFLAGS in configure.py
2018-04-06 09:14:02 -04:00
Ryan Schmidt
ccec031950
Honor CXXFLAGS in configure.py 2018-04-06 03:15:01 -05:00
Takuto Ikuta
834c674368 Add appveyor.yml 2018-04-06 17:03:03 +09:00
Nico Weber
04ba59b2ad
Merge pull request #1407 from nico/vim
update ninja.vim version after bff884d55
2018-04-05 15:24:18 -04:00
Nico Weber
78759d0977 update ninja.vim version after bff884d55 2018-04-05 15:23:56 -04:00
Nico Weber
03df526e07
Merge pull request #1406 from nico/dupeerr
make `-w dupbuild` default to `err`
2018-04-05 15:00:06 -04:00
Nico Weber
42eefc854b make -w dupbuild default to err
You can still opt out of this by passing `-w dupbuild=warn`.
But if you're getting this diagnostic, your build files are incorrect
and you should ideally just fix them.

This is step 3 on https://github.com/ninja-build/ninja/issues/931
I sent an RfC to ninja-build a few months ago; nobody objected.
2018-04-05 14:48:35 -04:00
Nico Weber
e85f5ac86b
Merge pull request #1348 from ngg/winunicode
Fix building on Windows in UNICODE mode
2018-04-05 14:19:05 -04:00
Nico Weber
26341ca0d6
Merge pull request #1223 from asankah/master
[compdb] Expand response files inline based on a switch.
2018-04-05 13:38:59 -04:00
Nico Weber
197b010341
Merge pull request #1405 from nico/showoldest
Fix confusing smart console output from concurrent builds
2018-04-05 13:27:55 -04:00
Nico Weber
52c1d0c8f8 Fix confusing smart console output from concurrent builds
Developers tend to blame the last printed line when a build takes too
long. Unfortunately, when building concurrently, the last printed line
may have actually finished a long time ago. Under the current system,
ninja does not update the status line to reflect what jobs are still
running. This change makes ninja always print the oldest still running job
instead. In other words, the likely build bottlenecks.

Patch from David Zarzycki, originally uploaded at #1320.
2018-04-05 13:23:28 -04:00
Nico Weber
f2bb21376c
Merge pull request #1294 from bradking/plan-track-scheduling
Track in Plan whether wanted edges have been scheduled
2018-04-05 13:07:58 -04:00
Nico Weber
ef05d51bf9
Merge pull request #1404 from nico/c++17
make ninja build with -std=c++17
2018-04-05 12:26:42 -04:00
Nico Weber
dfed28c307 make ninja build with -std=c++17
Ninja is supposed to be able to build as C++98 so it can run on old
systems, but it should also be possible to optionally build it with
newer dialects.
2018-04-05 12:25:02 -04:00
Nico Weber
5d43e74571
Merge pull request #1361 from ppluciennik/ppluciennik/flush_log
Flush changes into .ninja_log right away.
2018-04-05 12:12:02 -04:00
Nico Weber
74b76d3010
Merge pull request #1365 from moroten/fix-disk-interface-tests-64-bit-timestamp
Fix disk_interface_test.cc on Windows for 64-bit timestamp
2018-04-05 12:10:54 -04:00
Asanka Herath
e71bcceefb [compdb] Move declarations closer to their use. 2018-04-05 11:18:09 -04:00
Asanka Herath
b6296fbde3 [compdb] Expand response files inline based on a switch.
References to response files in a clang compile_commands.json file can
be tricky to deal with when tooling expects all the command flags to be
present in the 'command' field.

This change introduces a '-x' option to '-t compdb' that will expand
@rspfile style response file invocations inline.

E.g.

```sh
$ ninja -t compdb cc
[
  {
    "directory": "/src/foo",
    "command": "cc -foo -bar @foo.obj.rsp",
    "file": "foo.cc"
  }
]

$ ninja -t compdb -x cc
[
  {
    "directory": "/src/foo",
    "command": "cc -foo -bar foo.cc",
    "file": "foo.cc"
  }
]
```
2018-04-05 10:57:14 -04:00
Nico Weber
4494d38c59
Merge pull request #1366 from fjhenigman/clean
Canonicalize targets of clean command.
2018-04-05 09:15:29 -04:00
Frank Henigman
b9d3ba2f16 Canonicalize targets of clean command.
This corrects an inconsistency where build targets were canonicalized
but clean targets were not.  For example you could build ./foo but not
clean ./foo.
2018-04-04 23:02:09 -04:00
Nico Weber
a741b119e6
Merge pull request #1386 from jmgao/exit
Don't clean up after ourselves when exiting.
2018-04-04 21:50:36 -04:00
Nico Weber
4fd758a81b
Merge pull request #1356 from RedBeard0531/vim_syntax
Improve vim syntax definition
2018-04-04 21:12:34 -04:00
Nico Weber
6bcdc7bfd1
Merge pull request #1392 from alekseyshl/master
Fix build on Solaris.
2018-04-04 21:08:03 -04:00
Nico Weber
f67e6fb6f6
Merge pull request #1373 from BillyDonahue/help_k_zero
Update Usage to show "-k 0" behavior
2018-04-04 21:06:30 -04:00
Nico Weber
1fc0e15547
Merge pull request #1381 from sgraham/output-in-compdb
Add 'output' field to compdb output
2018-04-04 20:58:37 -04:00
Nico Weber
6c379a3494
Merge pull request #1388 from karkhaz/kk-add-pool-to-build
Support pool for Writer.build() in ninja_syntax.py
2018-04-04 20:47:38 -04:00
alekseyshl
1952afa561 Fix build on Solaris.
Solaris also does not define struct stat's st_mtimensec field.
2018-03-05 03:13:42 -08:00
Kareem Khazem
85fab32362
Support pool for Writer.build() in ninja_syntax.py
ninja_syntax.py now supports a pool being specified for individual
builds, as well as rules.
2018-02-20 18:51:01 +00:00