GYP to GN Migration Changes
Stay organized with collections
Save and categorize content based on your preferences.
This file tracks changes to configuration meta build configuration variables in
the GYP to GN migration. Reference the table below to find the correct GN
equivalent to a changed variable, deprecated GYP variables not in GN, and added
variables.
Variable Changes
GYP |
GN |
GN import |
OS ("starboard"/other) |
is_starboard (true/false) |
(global) |
clang (0/1) |
is_clang (true/false) |
(global) |
has_input_events_filter |
is_internal_build (true/false) |
(global) |
has_drm_system_extension |
is_internal_build (true/false) |
(global) |
has_cdm |
is_internal_build (true/false) |
(global) |
has_private_system_properties |
is_internal_build (true/false) |
(global) |
sb_pedantic_warnings (0/1) |
has_pedantic_warnings (true/false) |
(global, see "Compiler Options" note) |
sb_deploy_output_dir |
sb_install_output_dir |
//starboard/build/config/base_configuration.gni |
sb_evergreen (0/1) |
sb_is_evergreen (true/false) |
//starboard/build/config/base_configuration.gni |
sb_evergreen_compatible (0/1) |
sb_is_evergreen_compatible (true/false) |
//starboard/build/config/base_configuration.gni |
sb_evergreen_compatible_libunwind (0/1) |
sb_evergreen_compatible_use_libunwind (true/false) |
//starboard/build/config/base_configuration.gni |
sb_disable_cpp14_audit |
(none) |
|
sb_disable_microphone_idl |
(none) |
|
starboard_path |
(none) |
|
tizen_os |
(none) |
|
includes_starboard |
(none) |
|
(none) |
has_platform_tests (true/false) |
//starboard/build/config/base_configuration.gni |
(none) |
has_platform_targets (true/false) |
//starboard/build/config/base_configuration.gni |
(none) |
install_target_path (true/false) |
//starboard/build/config/base_configuration.gni |
Other Changes
GYP |
GN |
Notes (see below) |
'STARBOARD_IMPLEMENTATION' |
"//starboard/build/config:starboard_implementation" |
Starboard Implementation |
optimize_target_for_speed (0) |
"//starboard/build/config:size" |
Optimizations |
optimize_target_for_speed (1) |
"//starboard/build/config:speed" |
Optimizations |
compiler_flags_*_speed |
speed_config_path |
Optimizations |
compiler_flags_*_size |
size_config_path |
Optimizations |
Notes:
Starboard Implementation: If your platform defined
STARBOARD_IMPLEMENTATION
in its implementation, you would now add the above
config with configs +=
["//starboard/build/config:starboard_implementation"]
.
Optimizations: Cobalt defaults to building targets to optimize for size.
If you need to optimize a target for speed, remove the size config and add
the speed config with configs -= [ "//starboard/build/config:size" ]
and
configs += [ "//starboard/build/config:speed" ]
. You can define these
configurations for your platform by creating config
s and pointing to the
correct ones for speed_config_path
and size_config_path
in your
platform's platform_configuration/configuration.gni
file.
Compiler Options: Cobalt compiles some targets with stricter,
platform-dependent settings than others. Before these targets would opt into
the stricter settings by setting sb_pedantic_warnings: 1
in their
variables
section. Now targets will be compiled with pedantic warnings if
the target sets has_pedantic_warnings=true
. The additional config that is
used to compile these targets is specified with the
pedantic_warnings_config_path
and no_pedantic_warnings_config_path
variables in your platform's platform_configuration/configuration.gni
file.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThis document outlines the changes to build configuration variables when migrating from GYP to GN in Starboard.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a table mapping old GYP variables to their GN equivalents, including deprecated and new variables.\u003c/p\u003e\n"],["\u003cp\u003eThe document also details changes related to Starboard implementation, target optimizations (size vs.speed), and compiler options.\u003c/p\u003e\n"],["\u003cp\u003ePlatforms may need to update their \u003ccode\u003eplatform_configuration/configuration.gni\u003c/code\u003e file to define specific configurations for optimizations and compiler options.\u003c/p\u003e\n"]]],["This document outlines changes during the GYP to GN migration for configuration variables. Key actions include mapping GYP variables to their GN equivalents, such as `OS` to `is_starboard` and `clang` to `is_clang`. Several GYP variables like `sb_disable_cpp14_audit` are removed in GN, and new GN variables like `has_platform_tests` were introduced. The document also details configuring targets for speed or size optimizations by adjusting GN configs and explains how to use pedantic warnings with the `has_pedantic_warnings` variable.\n"],null,["This file tracks changes to configuration meta build configuration variables in\nthe GYP to GN migration. Reference the table below to find the correct GN\nequivalent to a changed variable, deprecated GYP variables not in GN, and added\nvariables.\n\nVariable Changes\n\n| *GYP* | *GN* | *GN import* |\n|-------------------------------------------|------------------------------------------------------|---------------------------------------------------|\n| `OS` (\"starboard\"/other) | `is_starboard` (true/false) | (global) |\n| `clang` (0/1) | `is_clang` (true/false) | (global) |\n| `has_input_events_filter` | `is_internal_build` (true/false) | (global) |\n| `has_drm_system_extension` | `is_internal_build` (true/false) | (global) |\n| `has_cdm` | `is_internal_build` (true/false) | (global) |\n| `has_private_system_properties` | `is_internal_build` (true/false) | (global) |\n| `sb_pedantic_warnings` (0/1) | `has_pedantic_warnings` (true/false) | (global, see \"Compiler Options\" note) |\n| `sb_deploy_output_dir` | `sb_install_output_dir` | `//starboard/build/config/base_configuration.gni` |\n| `sb_evergreen` (0/1) | `sb_is_evergreen` (true/false) | `//starboard/build/config/base_configuration.gni` |\n| `sb_evergreen_compatible` (0/1) | `sb_is_evergreen_compatible` (true/false) | `//starboard/build/config/base_configuration.gni` |\n| `sb_evergreen_compatible_libunwind` (0/1) | `sb_evergreen_compatible_use_libunwind` (true/false) | `//starboard/build/config/base_configuration.gni` |\n| `sb_disable_cpp14_audit` | (none) | |\n| `sb_disable_microphone_idl` | (none) | |\n| `starboard_path` | (none) | |\n| `tizen_os` | (none) | |\n| `includes_starboard` | (none) | |\n| (none) | `has_platform_tests` (true/false) | `//starboard/build/config/base_configuration.gni` |\n| (none) | `has_platform_targets` (true/false) | `//starboard/build/config/base_configuration.gni` |\n| (none) | `install_target_path` (true/false) | `//starboard/build/config/base_configuration.gni` |\n\nOther Changes\n\n| *GYP* | *GN* | *Notes* (see below) |\n|---------------------------------|-------------------------------------------------------|--------------------------|\n| `'STARBOARD_IMPLEMENTATION'` | `\"//starboard/build/config:starboard_implementation\"` | Starboard Implementation |\n| `optimize_target_for_speed` (0) | `\"//starboard/build/config:size\"` | Optimizations |\n| `optimize_target_for_speed` (1) | `\"//starboard/build/config:speed\"` | Optimizations |\n| `compiler_flags_*_speed` | `speed_config_path` | Optimizations |\n| `compiler_flags_*_size` | `size_config_path` | Optimizations |\n\nNotes:\n\n- *Starboard Implementation:* If your platform defined\n `STARBOARD_IMPLEMENTATION` in its implementation, you would now add the above\n config with `configs +=\n [\"//starboard/build/config:starboard_implementation\"]`.\n\n- *Optimizations:* Cobalt defaults to building targets to optimize for size.\n If you need to optimize a target for speed, remove the size config and add\n the speed config with `configs -= [ \"//starboard/build/config:size\" ]` and\n `configs += [ \"//starboard/build/config:speed\" ]`. You can define these\n configurations for your platform by creating `config`s and pointing to the\n correct ones for `speed_config_path` and `size_config_path` in your\n platform's `platform_configuration/configuration.gni` file.\n\n- *Compiler Options:* Cobalt compiles some targets with stricter,\n platform-dependent settings than others. Before these targets would opt into\n the stricter settings by setting `sb_pedantic_warnings: 1` in their\n `variables` section. Now targets will be compiled with pedantic warnings if\n the target sets `has_pedantic_warnings=true`. The additional config that is\n used to compile these targets is specified with the\n `pedantic_warnings_config_path` and `no_pedantic_warnings_config_path`\n variables in your platform's `platform_configuration/configuration.gni`\n file."]]