[cfe-dev] Building libcxx with Ninja

Nico Weber via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 18 08:35:34 PDT 2017


Erika: On some Linux distributions, if you want to use the distributions's
package manager, you need to install package "ninja-build" since "ninja" is
some ancient database iirc. See
https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages

`ninja --help` should print something like this:
$ ninja --help
usage: ninja [options] [targets...]

if targets are unspecified, builds the 'default' target (see manual).

options:
  --version  print ninja version ("1.7.2")

  -C DIR   change to DIR before doing anything else
  -f FILE  specify input build file [default=build.ninja]

  -j N     run N jobs in parallel [default=10, derived from CPUs available]
  -k N     keep going until N jobs fail [default=1]
  -l N     do not start new jobs if the load average is greater than N
  -n       dry run (don't run commands but act like they succeeded)
  -v       show all command lines while building

  -d MODE  enable debugging (use -d list to list modes)
  -t TOOL  run a subtool (use -t list to list subtools)
    terminates toplevel options; further flags are passed to the tool
  -w FLAG  adjust warnings (use -w list to list warnings)

On Tue, Apr 18, 2017 at 10:18 AM, Brian Cain via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Bringing this thread back onto the list, looks like we went off list at
> some point.
>
>
>> On Apr 17, 2017 10:51 PM, "Erika Butler" <beneficii at gmail.com> wrote:
>>>>>
>>>>>> It's version 2.3 of ninja. This is the latest I could find for
>>>>>> Windows.
>>>>>>
>>>>>> I can't find the cmake version, but it was built on April 10, 2017,
>>>>>> so I think that's new enough.
>>>>>>
>>>>>> 2017-04-17 20:46 GMT-07:00 Brian Cain <brian.cain at gmail.com>:
>>>>>>
>>>>>>> Not sure. Are you certain your version of ninja and cmake are new
>>>>>>> enough?
>>>>>>>
>>>>>>> On Apr 17, 2017 10:38 PM, "Erika Butler" <beneficii at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I added the Ninja directory to my PATH variable and reopened the
>>>>>>>> admin Command Prompt. I changed CMAKE_MAKE_PROGRAM to this:
>>>>>>>>
>>>>>>>> -DCMAKE_MAKE_PROGRAM=ninja
>>>>>>>>
>>>>>>>> I executed the command again, Ninja still reported an error, now
>>>>>>>> saying in ninja.exe.log:
>>>>>>>>
>>>>>>>> usage: ninja [-h] [-f file [file ...]] [-l lineno [lineno ...]]
>>>>>>>>              [-p project [project ...]] [--plugin plugin [plugin
>>>>>>>> ...]]
>>>>>>>>              [--loglevel loglevel] [--logfile logfile]
>>>>>>>>              [file [file ...]]
>>>>>>>> ninja: error: unrecognized arguments: --version
>>>>>>>>
>>>>>>>> It seems cmake wants to pass a "--version" argument to its command
>>>>>>>> to open ninja, which causes ninja to complain.
>>>>>>>>
>>>>>>>> What can I do?
>>>>>>>>
>>>>>>>
>
> My ninja version is 1.3.4 and when I run "ninja --version" it reports
> "1.3.4".  It does not give this error message.  When I run "ninja --help"
> it shows something very different from the help message you're showing here.
>
> https://ninja-build.org/ claims that the latest version available is "The
> last Ninja release is v1.7.2, released 7 Nov 2016."  But you said you have
> version 2.3.
>
> I think that you have another executable called "ninja" in your PATH.  Can
> you check it?  See if you get different results with binaries from here --
> https://github.com/ninja-build/ninja/releases
>
> -Brian
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170418/bf2c8fb4/attachment.html>


More information about the cfe-dev mailing list