Starboard: configuration.gni Reference Guide

  • This document lists build variables used for configuring the Cobalt platform across different target environments.

  • Variables control aspects such as executable type, library sources (EGL/GLES), compiler options, and Starboard API version.

  • Developers can override default values to customize the build process for their specific platform needs.

  • Several variables are related to the integration of Starboard, an abstraction layer for platform services.

  • Variables related to V8, the JavaScript engine, determine features like pointer compression and WebAssembly support.

Variables
cobalt_licenses_platform

Sub-directory to copy license file to.

The default value is "default".
cobalt_platform_dependencies

List of platform-specific targets that get compiled into cobalt.

The default value is [].
cobalt_v8_emit_builtins_as_inline_asm

Some compiler can not compile with raw assembly(.S files) and v8 converts asm to inline assembly for these platforms.

The default value is false.
final_executable_type

The target type for executable targets. Allows changing the target type on platforms where the native code may require an additional packaging step (ex. Android).

The default value is "shared_library".
gl_type

The source of EGL and GLES headers and libraries. Valid values (case and everything sensitive!):
  • system_gles2 - Use the system implementation of EGL + GLES2. The headers and libraries must be on the system include and link paths.
  • angle - Use ANGLE's EGL + GLES2 implementation. This requires a valid ANGLE implementation for the platform.

    The default value is "system_gles2".
gtest_target_type

The target type for test targets. Allows changing the target type on platforms where the native code may require an additional packaging step (ex. Android).

The default value is "shared_library".
has_platform_targets

Whether the platform has platform-specific targets to depend on.

The default value is false.
loadable_module_configs

Target-specific configurations for loadable_module targets.

The default value is [].
nasm_exists

Enables the nasm compiler to be used to compile .asm files.

The default value is false.
path_to_nasm

Where yasm can be found on the host device.

The default value is "nasm".
platform_tests_path

Set to the starboard_platform_tests target if the platform implements them.

The default value is "".
sabi_path

Where the Starboard ABI file for this platform can be found.

The default value is "starboard/sabi/default/sabi.json".
sb_api_version

The Starboard API version of the current build configuration. The default value is meant to be overridden by a Starboard ABI file.

The default value is 18.
sb_enable_benchmark

Used to enable benchmarks.

The default value is false.
sb_enable_cpp17_audit

Enables an NPLB audit of C++17 support.

The default value is true.
sb_enable_cpp20_audit

Enables an NPLB audit of C++20 support.

The default value is true.
sb_enable_lib

Enables embedding Cobalt as a shared library within another app. This requires a 'lib' starboard implementation for the corresponding platform.

The default value is false.
sb_enable_opus_sse

Enables optimizations on SSE compatible platforms.

The default value is true.
sb_evergreen_compatible_use_libunwind

Whether to use the libunwind library on Evergreen compatible platform.

The default value is false.
sb_filter_based_player

Used to indicate that the player is filter based.

The default value is true.
sb_has_unused_symbol_issue

Set this to true if the modular toolchain linker doesn't strip all unused symbols and nplb fails to link.

The default value is false.
sb_libevent_method

The event polling mechanism available on this platform to support libevent. Platforms may redefine to 'poll' if necessary. Other mechanisms, e.g. devpoll, kqueue, select, are not yet supported.

The default value is "epoll".
sb_static_contents_output_data_dir

Directory path to static contents' data.

The default value is "/project_out_dir/content/data".
sb_use_no_rtti

Whether or not to disable run-time type information (adding no_rtti flag).

The default value is false.
source_set_configs

Target-specific configurations for source_set targets.

The default value is [].
starboard_level_final_executable_type

The default value is "executable".
starboard_level_gtest_target_type

The default value is "executable".
static_library_configs

Target-specific configurations for static_library targets.

The default value is [].
use_crashpad

Platforms can set this to false to avoid building and using a real crashpad implementation. If false, crashpad either won't be built or a stub implementation will be built and used. all Early Access Program platforms.

The default value is true.
v8_enable_pointer_compression_override

Set to true to enable pointer compression for v8.

The default value is true.