Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.1 KB

setup-gn.md

File metadata and controls

43 lines (33 loc) · 1.1 KB

Install Standalone Google gn Build Configuration Tool

🚨🚨🚨 DEPRECATED 🚨🚨🚨

We now ship Google gn as part of depot_tools with CMake during the configure step. No manual setup is required.


gn -- short for generate Ninja -- is Google's take on CMake.

Build from Source

Preliminaries

  • Install git.
  • Install ninja.
  • Install a C and C++ compiler and set CC and CXX environment variables.

Build gn

  • Clone the repository, generate ninja files, and compile gn.
$ git clone https://gn.googlesource.com/gn
$ cd gn
$ python build/gen.py
$ ninja -C out
  • Make the gn executable available in your $PATH, e.g.
$ cp out/gn /usr/local/bin

Make sure that standalone gn is your default version. (depot_tools also includes a gn version, and we don't want to use that.)

  • Verify installation succeeded:
$ which gn
/usr/local/bin/gn

This is a condensed version of Build Google gn build tool standalone.

Install on ArchLinux

You can simply install the package extra/gn.