Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

65.6. gn-0.2540

Chromium's meta-build system, which writes ninja files from BUILD.gn

0.2540-1 · BSD-3-Clause · 1.7 SBU · 4.4 MiB, 2 files · 40_lang, 6 of 186 · ports/core/buildtools/gn

Homepage: https://gn.googlesource.com/gn

Why it is in KDOS. The comment above it in script/phases/40_lang/packages.d/buildtools.txt:

The build system pdfium is built with; it exists for pdfium alone.

Depends on: python3, ninja.

Required by (2): chromium, pdfium.

Sources: gn-0.2540.tar.zst (917.7 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install gn'

build.sh:

tar -xf "$PORT_SRC/$name-$version.tar.zst" --strip-components=1

export CC=gcc CXX=g++ AR=ar
CFLAGS="${CFLAGS/-std=gnu11/}" python3 build/gen.py --no-last-commit-position --no-static-libstdc++ --allow-warnings
ninja -C out gn
install -Dm755 out/gn "$PKG/usr/bin/gn"

Programs: gn.

Directories: /usr/share/licenses/gn.