GYP(1)

πŸ’– GYP β€” the manual page, but make it a group chat πŸ’–

okay bestie, sit down, hydrate, because we're talking about gyp β€” the cross-platform makefile generator for Chromium. yes THAT one. the build-file whisperer. the one that turns your cute little .gyp files into actual build scripts your computer can understand. she's giving ✨ project-file factory ✨ and we're obsessed.


🌸 SYNOPSIS 🌸

gyp [options] [build_file...]

that's it. that's the whole vibe. options, then optionally some build files. slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually DO? she takes the build files you hand her and generates build scripts or project files in whatever format your current platform speaks natively. that's the whole job. iconic behavior.

and if you're like "bestie I'm not specifying any build files"? no worries. she just grabs every file in the current directory with a .gyp suffix and uses those. she's self-sufficient like that. main character energy fr fr πŸ’…


✨ OPTIONS ✨

okay here's the full menu, no skips, no skims, we're listing EVERYTHING because we don't gatekeep:

  • -D<variable>=<value> β€” hands a default value to the variable you name. it's a supplement to whatever's already chillin' in the GYP_DEFINES environment variable, which btw should be a space-separated list of <variable>=<value> pairs. teamwork makes the dream work 🫢
  • -f<format>[(,<format>)...], --format=<format>[(,<format>)...] β€” generate output in the format(s) you list. valid formats include make (GNU makefile), xcode (Xcode project file), msvs (Visual Studio project file), scons (SCons rule set), and gypd (gyp input, for debugging β€” yes, gyp's debug outfit is just… itself). and you can stack multiple formats with commas, go off.

defaults to whatever's in the GYP_GENERATORS environment variable (comma-separated list of formats, bestie), or the platform's native format if that's unset: xcode for Mac OS X, msvs for Windows (including Cygwin), and make for other Unix. she knows her audience πŸ’œ

  • -I<path>, --include=<path> β€” implicitly smooshes the contents of the <path> file into ALL loaded .gyp files. like a group project where everyone gets the same handout. no one's left out. 🌈
  • --depth=<path> β€” okay so for Chromium specifically, the gyp "depth" variable is supposed to always be a relative path to Chromium's top-level src directory. this option lets you specify a path that the DEPTH variable gets set relative to.

defaults to the first directory named src that's found as an ancestor of one of the build files you passed on the command line. she goes looking for her roots. respect. 🌱

  • -d<debug mode>, --debug=<debug mode> β€” turns on debugging output. valid debug modes are "general" (lists the options used), "variables" (traces variable expansion), and "includes" (traces build file include directives). it's giving detective era πŸ”
  • -S<suffix>, --suffix=<suffix> β€” sticks your chosen string into the names of generated files, right before the standard extension. for example: with the make backend and a suffix of .foo, gyp writes the main makefile to Makefile.foo and target-specific snippets to target.foo.mk. customized. personalized. her little signature πŸ’…
  • -G<flag>=<value> β€” sets a "generator flag," which is an option specific to a particular output format. all generator flags have names beginning with the name of the output format. this supplements the GYP_GENERATOR_FLAGS environment variable, which should be a space-separated list of <flag>=<value> pairs. yes another env var, keep up bestie πŸ“
  • --generator-output=<dir> β€” writes the generated build files under the <dir> directory and adjusts paths accordingly. this is the "build somewhere that isn't where my source lives" option, and honestly? valid. separate your spaces, queen.

this overrides the GYP_GENERATOR_OUTPUT environment variable. env var found irrelevant. πŸ’€

  • --ignore-environment β€” do NOT read options from environment variables. the environment is silenced. blocked. unfollowed. πŸ™ˆ
  • --check β€” takes extra time to verify the syntax of each build_file. slower but thorough, and honestly we love a perfectionist.
  • --parallel β€” uses multiprocessing for speed. and yes, it is marked (experimental), so treat it like a new friendship: promising, exciting, maybe a little chaotic. πŸ”₯
  • --toplevel-dir=<dir> β€” the directory to use as the root of the source tree. that's the whole description, bestie, she said what she said.
  • --build=<configs> β€” configuration for build after project generation. so, like, what happens next πŸ‘€
  • --no-circular-check β€” disables the check for circular relationships between .gyp files. now listen: those relationships should not exist, okay? but they've only ever been observed to be harmful with the Xcode output format. Chromium's .gyp files currently have some circular relationships on non-Mac platforms, which is why this option exists β€” it lets you keep the strict behavior on Macs and the lenient behavior everywhere else. flexibility, but make it slightly cursed.
heads up bestie: this option is likely to be removed once all the circular relationships in Chromium are eliminated. so don't get too attached. 😭

🌟 ENVIRONMENT 🌟

  • GYP_DEFINES, GYP_GENERATORS, GYP_GENERATOR_FLAGS, GYP_GENERATOR_OUTPUT β€” these four icons. go read the -D, --format, -G, and --generator-output options above, because that's literally what they map to. iykyk. ⭐

πŸŽ€ FILES πŸŽ€

  • ~/.gyp/include.gypi β€” implicitly included before anything else in every .gyp file. she's first in line, always, no exceptions, main character, periodt. πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ

the other build-system girlies. we love them, we respect them, we are simply built different. no cap. 🧚


and that's the whole page, bestie!! this was the GYP(1) manual β€” source and version GYP(1), dated 01/26/2025 β€” so go forth, generate those build files, and remember: every .gyp you feed her is a little act of self-care. slay, stay hydrated, and don't forget the --check if you're feeling thorough πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from