GN
What it is
GN is a meta-build system that generates Ninja build files. It is used for Chromium, Fuchsia, and related projects, and is designed for projects with thousands of build files and tens of thousands of source files. It supports multi-platform projects, including targeting multiple platforms in one build invocation, and separate output directories let teams maintain configurations for different platforms or build types. GN generates Ninja files for C, C++, Rust, Objective C, and Swift; script-based action rules can cover other languages. It checks dependencies, inputs, and outputs where possible, with tools such as `gn check`, `testonly`, and `assert_no_deps`. Users set up build directories and arguments, and Ninja files are regenerated automatically when out of date. Cross-compilation uses target OS and CPU arguments, with Android and ChromeOS examples in the quick start. GN is free, with binaries for Linux, macOS, and Windows. There is no stable version for every project, and new versions are not guaranteed to be backward compatible.
For and against
For
- Free, with Linux, macOS, and Windows binaries
- Can target multiple platforms in one invocation
- Supports separate build configurations in parallel
- Includes dependency and output checks
- Supports several programming languages
Against
- No stable version intended for every project
- New versions are not guaranteed backward compatible
The verdict
GN offers build generation and checks for large, multi-platform projects. Teams should account for version compatibility when choosing which GN commit to use.
Who it suits
GN suits developers building multi-platform projects with Ninja, especially teams working on Chromium, Fuchsia, or related projects. Projects must select a compatible GN version.
Plans and prices
GN
No stable version for all projects · Developers select a compatible commit or build from source
Read 9 Oct 2026 · gn.googlesource.com
On the record
- Build checks
- GN checks dependencies, inputs, and outputs where possible, and includes tools such as `gn check`, `testonly`, and `assert_no_deps`.gn.googlesource.com · read 9 Oct 2026
- Build directory workflow
- Users configure build directories and arguments, and Ninja files are regenerated automatically when they are out of date.gn.googlesource.com · read 9 Oct 2026
- Compatibility limit
- GN does not guarantee backward compatibility for new versions and has no versioning scheme beyond commits to the main branch.gn.googlesource.com · read 9 Oct 2026
- Cross-compilation
- The quick start documents cross-compiling by setting target OS and CPU build arguments, including Android and ChromeOS examples.gn.googlesource.com · read 9 Oct 2026
- Downloads
- The project provides GN binaries for Linux, macOS, and Windows, and also documents building GN from source with a C++23 compiler.gn.googlesource.com · read 9 Oct 2026
- Languages
- GN generates Ninja files for C, C++, Rust, Objective C, and Swift; other languages can use script-based action rules.gn.googlesource.com · read 9 Oct 2026
- Parallel configurations
- It supports multiple output directories with separate configurations so developers can maintain builds for different platforms or build types in parallel.gn.googlesource.com · read 9 Oct 2026
- Platform builds
- GN supports multi-platform projects and can target multiple platforms in a single build invocation.gn.googlesource.com · read 9 Oct 2026
- Purpose
- GN is a meta-build system that generates build files for Ninja.gn.googlesource.com · read 9 Oct 2026
- Scale
- It is designed to scale to thousands of build files and tens of thousands of source files.gn.googlesource.com · read 9 Oct 2026
- Security and compliance
- The project page links contributors to Google’s Contributor License Agreement; it does not state a security certification or compliance program.gn.googlesource.com · read 9 Oct 2026
- Support
- Users can report bugs in the GN bug database and ask questions or follow development on the Chromium GN developers Google Group.gn.googlesource.com · read 9 Oct 2026
- Toolchain integration
- GN generates Ninja build files and can integrate with compiler and linker settings defined by a project’s build configuration.gn.googlesource.com · read 9 Oct 2026
- Use cases
- GN is used as the build system for Chromium, Fuchsia, and related projects.gn.googlesource.com · read 9 Oct 2026
- Versioning limit
- GN has no current stable version intended to work for all projects; projects are expected to choose a compatible GN version.gn.googlesource.com · read 9 Oct 2026