AI-generated Key Takeaways
-
This document outlines the changes to build configuration variables when migrating from GYP to GN in Starboard.
-
It provides a table mapping old GYP variables to their GN equivalents, including deprecated and new variables.
-
The document also details changes related to Starboard implementation, target optimizations (size vs.speed), and compiler options.
-
Platforms may need to update their
platform_configuration/configuration.gnifile to define specific configurations for optimizations and compiler options.
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_IMPLEMENTATIONin its implementation, you would now add the above config withconfigs += ["//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" ]andconfigs += [ "//starboard/build/config:speed" ]. You can define these configurations for your platform by creatingconfigs and pointing to the correct ones forspeed_config_pathandsize_config_pathin your platform'splatform_configuration/configuration.gnifile.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: 1in theirvariablessection. Now targets will be compiled with pedantic warnings if the target setshas_pedantic_warnings=true. The additional config that is used to compile these targets is specified with thepedantic_warnings_config_pathandno_pedantic_warnings_config_pathvariables in your platform'splatform_configuration/configuration.gnifile.