How do I compile our program using the Ninja compilation system?

Source: Internet
Author: User

    • Using Ninja
      • Configure your environment to use Ninja
    • Build Programs
    • Android using Ninja
    • Windows uses
      • Debugging
      • Do not use vs
    • Skills

    • Problem

Ninja's original intention is Ninja, Ninja Turtle Ninja, here is used by Google to their compilation system, the goal is to replace make and other builders, because they feel that the other builders are too slow, for which they have to compare, for Chrome and other tens of thousands of files of the oversized program, With Ninja, the compilation starts almost immediately, and make takes almost 10 seconds to start compiling.

Ninja Another feature, in fact, is not his mother's characteristics, is independent of the compilation system input files, I want to ask Google God, is not cmake CMakeList.txt it?

Google compares other compilation systems to high-level languages, and tries to design it as a lower-level assembler to optimize compilation performance from the command plane. Ninja's build file is for people to read, but not particularly handy for handwriting. These features allow her to quickly evaluate incremental builds. After all, not every time you have to start from scratch.


Ninjia's underlying features make her more suitable for embedding powerful build systems. With Gyp (haha, CMakeLists.txt), Ninja can build chrome and V8, node. js, and more. With CMake, Ninja can build LLVM (virtual machines), KDE desktops, and so on.

How to get ninja?

On GitHub: Git clone git://github.com/martine/ninja.git

Or we can do this on the Debian/ubuntu: Apt-get install Ninja-build


This article is original, reproduced please indicate the source, offenders must investigate

Focus on the public platform: the Programmer Interaction Alliance (coder_online), you can get the first original technical articles, and (Java/c/c++/android/windows/linux) technology Daniel Friends, online communication programming experience, get programming basics, Solve programming problems. Programmer Interactive Alliance, Developer's own home.

Section reference: Https://code.google.com/p/chromium/wiki/NinjaBuild

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

How do I compile our program using the Ninja compilation system?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.