From f38f3623497c6fd48bbe0540cedbce0bc9a0b8e5 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 30 Aug 2023 13:21:06 -0400 Subject: [PATCH] Disable Chromium field trials in official builds (fixes #3560) --- tools/gn_args.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/gn_args.py b/tools/gn_args.py index 697908df2..becfcda91 100644 --- a/tools/gn_args.py +++ b/tools/gn_args.py @@ -466,14 +466,18 @@ def GetConfigArgs(args, is_debug, cpu): """ add_args = {} - # Cannot create is_official_build=true is_debug=true builds. - # This restriction is enforced in //build/config/BUILDCONFIG.gn. - # Instead, our "official Debug" build is a Release build with dchecks and - # symbols. Symbols will be generated by default for official builds; see the - # definition of 'symbol_level' in //build/config/compiler/compiler.gni. - if is_debug and GetArgValue(args, 'is_official_build'): - is_debug = False - add_args['dcheck_always_on'] = True + if GetArgValue(args, 'is_official_build'): + # Disable Chromium field trials in official builds. + add_args['disable_fieldtrial_testing_config'] = True + + # Cannot create is_official_build=true is_debug=true builds. + # This restriction is enforced in //build/config/BUILDCONFIG.gn. + # Instead, our "official Debug" build is a Release build with dchecks and + # symbols. Symbols will be generated by default for official builds; see the + # definition of 'symbol_level' in //build/config/compiler/compiler.gni. + if is_debug: + is_debug = False + add_args['dcheck_always_on'] = True result = MergeDicts(args, add_args, { 'is_debug': is_debug,