Skip to content

Repository files navigation

GN-Legacy

A GN Build Toolchain for Legacy Windows (and Linux).

This is the GN + Ninja build system that Chromium uses, but minimal and specifically designed for building C/C++ apps targeting legacy versions of Windows.
In addition, the toolchain supports running on legacy Windows (down to XP).

Usage

See the docs directory.

Motivation

GN-Legacy was built from the ground up for targeting legacy Windows (i.e. NT 4.0, 2000, XP, Vista, 7), but it can target modern Windows too.
It makes building small or large C/C++ projects faster and easier. Makefiles don't have the cross platform extensibility that GN provides, or the compilation speed that Ninja provides. I found existing toolchains impractical, or they straight up don't work.

Existing projects that aim to simplify Win32 build toolchains often can't target anything older than Windows 7 (Modern MSVC for example), or they are incomplete/hard to use. That's where this project comes in. There is a small learning curve getting used to how GN works and how to write BUILD.gn files, but once you learn it, I feel almost every C/C++ dev can appreciate what the build system has to offer.

Acknowledgments

Tim Niederhausen for his forks GN (Here), and Ninja (Here), which mine are based on. I also initially based this repo on his gn-build repo, but found it too like Chromium's and too tied to Visual Studio.

Christopher Wellons for showing me how to compile MinGW targeting old Windows. His w64devkit is a good alternative to this toolchain, it provides a bash shell with Make, Ninja, MinGW, busybox, and NSIS, that supports Windows XP.

Will and iProgramInCpp for additional patches that I found useful in making the compiler toolchains for this repo.

Chromium Team for these projects in the first place. (Fun fact, I'm in that file)

License

This repository is licensed under the BSD 3-Clause License.

Releases

Packages

Contributors

Languages