Skip to main content

Overview

The flags.gn file contains GN (Generate Ninja) build arguments that control how Helium is compiled. These flags disable unwanted Chromium features, configure API keys, and optimize the build for privacy.
This file is located at the root of the source directory and is read during the build process.

File Format

The file uses GN’s simple key-value format:
flag_name=value
  • Boolean values: true or false
  • String values: "string content" (quoted)
  • Numeric values: 0, 1, 2, etc.

Build Flags

Privacy & Telemetry

enable_reporting
boolean
default:"false"
Disables Chromium’s crash and error reporting system. Set to false to prevent any telemetry data from being sent to Google.
enable_remoting
boolean
default:"false"
Disables Chrome Remote Desktop functionality. Set to false to remove this feature entirely from the build.
disable_fieldtrial_testing_config
boolean
default:"true"
Disables Google’s A/B testing framework (field trials). Set to true to prevent automatic participation in experiments.

Network Services

enable_mdns
boolean
default:"false"
Disables multicast DNS (mDNS) support. Set to false to prevent local network device discovery.
enable_service_discovery
boolean
default:"false"
Disables network service discovery features. Set to false to remove SSDP and similar protocols.
enable_hangout_services_extension
boolean
default:"false"
Disables the Google Hangouts services extension. Set to false to remove this Google-specific feature.

Security & DRM

enable_widevine
boolean
default:"true"
Enables Widevine DRM support for protected content playback. Set to true to allow streaming services like Netflix.
safe_browsing_mode
integer
default:"0"
Controls Safe Browsing functionality:
  • 0: Completely disabled
  • 1: Standard protection
  • 2: Enhanced protection
Helium disables this to prevent phishing/malware URL checks from being sent to Google.

API Keys

google_api_key
string
default:"\"\""
Google API key for various services. Set to empty string "" to disable Google API features.
google_default_client_id
string
default:"\"\""
OAuth 2.0 client ID for Google services. Set to empty string to disable sync and account features.
google_default_client_secret
string
default:"\"\""
OAuth 2.0 client secret for Google services. Set to empty string to disable authentication.
use_official_google_api_keys
boolean
default:"false"
Whether to use official Google API keys. Set to false for privacy-focused builds.

Build Optimization

clang_use_chrome_plugins
boolean
default:"false"
Disables Chrome-specific Clang plugins during compilation. Can speed up builds but may miss some warnings.
treat_warnings_as_errors
boolean
default:"false"
Controls whether compiler warnings cause build failures. Set to false for easier development.
exclude_unwind_tables
boolean
default:"true"
Excludes unwind tables from the binary, reducing size. Set to true unless you need detailed crash reports.
chrome_pgo_phase
integer
default:"0"
Profile-Guided Optimization phase:
  • 0: Disabled
  • 1: Instrumentation phase
  • 2: Optimization phase

Machine Learning

build_with_tflite_lib
boolean
default:"false"
Disables TensorFlow Lite library inclusion. Set to false to reduce binary size and remove ML features.

Version Control

use_unofficial_version_number
boolean
default:"false"
Whether to use unofficial version numbering. Typically false to maintain compatibility with extension APIs.

Example Configuration

# Privacy-focused configuration
enable_reporting=false
enable_remoting=false
safe_browsing_mode=0
google_api_key=""

# Keep DRM for streaming
enable_widevine=true

# Optimize build
exclude_unwind_tables=true
treat_warnings_as_errors=false

Build docs developers (and LLMs) love