Using the Ninja Build System

1 minute read

To allow Android version 8 (“O”) and Chromium builds, eMake supports the Ninja build system. eMake can emulate Ninja in addition to the standard Accelerator make-based builds such as gmake and NMAKE. eMake supports Ninja version 1.7.2 and newer.

eMake with Ninja emulation supports schedule optimization, JobCache, parse avoidance, Ledger, eDepend (autodep), and pragmas. You can use Ninja and gmake-based builds in a single eMake invocation.

Dependency optimization is not supported.

eMake with Ninja emulation supports pragmas. Using pragmas for builds with the eMake Ninja emulation mode enabled ( --emake-emulation=ninja ) requires an addendum file that contains the pragmas for Ninja targets. You specify the file by using the --emake-pragmafile option.

Pragma addendum files are optional with any other emulation mode. For more information about pragma addendum files, see Specifying Pragmas in an Addendum File.

Ninja emulation works only with builds using Agents. eMake does not support Ninja’s “debug” or “tool” options.

To enable Ninja emulation, use the following option to set the emulation type: