Skip to content

Commit

Permalink
[fuchsia] GN args bundle for size-optimized Cast Receivers
Browse files Browse the repository at this point in the history
Add a .gni file that developers and bots can import when building for
Cast Receivers where binary size is important.

This approach allows reuse and consistency without needing to add
another global GN arg. It is similar to //build/args/headless.gn.

Bug: 1294938, 1329657
Test: Add `import("//build/config/fuchsia/size_optimized_cast_receiver_args.gn")` in `gn args`.
Change-Id: Ibd60899fd56508d967500bb4c8b62b95c03bd0d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3832505
Reviewed-by: Chong Gu <chonggu@google.com>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1037864}
  • Loading branch information
ddorwin authored and Chromium LUCI CQ committed Aug 22, 2022
1 parent ecc9cfa commit 051d1d2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions build/config/fuchsia/size_optimized_cast_receiver_args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2022 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file contains feature and optimization overrides that are commonly
# required or useful for Cast Receiver implementations.
# It prioritizes size and disables unneeded features that may add size.
#
# To use it do one of the following:
# * Add the following to your `gn args`:
# import("//build/config/fuchsia/size_optimized_cast_receiver_args.gn")
# * Add the following to `gn_args` in a bot recipe:
# 'args_file': '//build/config/fuchsia/size_optimized_cast_receiver_args.gn'

# There is no reason these values couldn't be used on other platforms, but this
# file is in a fuchsia/ directory and some refactoring would probably be
# appropriate before reusing this file.
# It is not possible to assert the platform because `target_os` is not defined
# when this file is imported.

enable_basic_printing = false
enable_cast_receiver = true
enable_dav1d_decoder = false

# //chrome makes many assumptions that Extensions are enabled.
# TODO(crbug.com/1352700): Fix theses assumptions or avoid building it.
# enable_extensions = false

enable_hidpi = false
enable_library_cdms = false
enable_logging_override = true
enable_pdf = false
enable_plugins = false
optimize_for_size = true
optional_trace_events_enabled = false

0 comments on commit 051d1d2

Please sign in to comment.