From 051d1d29039686c18fc0b72038f7b7f67c4cd8af Mon Sep 17 00:00:00 2001 From: David Dorwin Date: Mon, 22 Aug 2022 19:06:42 +0000 Subject: [PATCH] [fuchsia] GN args bundle for size-optimized Cast Receivers 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 Reviewed-by: Sergey Ulanov Commit-Queue: David Dorwin Cr-Commit-Position: refs/heads/main@{#1037864} --- .../size_optimized_cast_receiver_args.gn | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 build/config/fuchsia/size_optimized_cast_receiver_args.gn diff --git a/build/config/fuchsia/size_optimized_cast_receiver_args.gn b/build/config/fuchsia/size_optimized_cast_receiver_args.gn new file mode 100644 index 00000000000000..2ccb1b297bce4b --- /dev/null +++ b/build/config/fuchsia/size_optimized_cast_receiver_args.gn @@ -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