mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Change official debug builds to release + dcheck_always_on (issue #1961)
This commit is contained in:
		@@ -195,6 +195,10 @@ def ValidateArgs(args):
 | 
			
		||||
    if not dcheck_always_on:
 | 
			
		||||
      msg('is_asan=true recommends dcheck_always_on=true')
 | 
			
		||||
 | 
			
		||||
  # Official build requires Release builds.
 | 
			
		||||
  if is_official_build:
 | 
			
		||||
    assert not is_debug, "is_official_build=true requires is_debug=false"
 | 
			
		||||
 | 
			
		||||
  if platform == 'windows':
 | 
			
		||||
    # Official builds should not use /DEBUG:FASTLINK.
 | 
			
		||||
    if is_official_build:
 | 
			
		||||
@@ -265,7 +269,18 @@ def GetConfigArgs(args, is_debug, is_x64):
 | 
			
		||||
  """
 | 
			
		||||
  Return merged GN args for the configuration and validate.
 | 
			
		||||
  """
 | 
			
		||||
  result = MergeDicts(args, {
 | 
			
		||||
  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
 | 
			
		||||
 | 
			
		||||
  result = MergeDicts(args, add_args, {
 | 
			
		||||
    'is_debug': is_debug,
 | 
			
		||||
    'target_cpu': 'x64' if is_x64 else 'x86',
 | 
			
		||||
  })
 | 
			
		||||
@@ -281,20 +296,22 @@ def GetAllPlatformConfigs(build_args):
 | 
			
		||||
  # Merged args without validation.
 | 
			
		||||
  args = GetMergedArgs(build_args)
 | 
			
		||||
 | 
			
		||||
  create_debug = True
 | 
			
		||||
 | 
			
		||||
  # Don't create debug directories for asan builds.
 | 
			
		||||
  is_asan = GetArgValue(args, 'is_asan')
 | 
			
		||||
  if is_asan:
 | 
			
		||||
    msg('Only generating Release configuration due to is_asan=true')
 | 
			
		||||
  if GetArgValue(args, 'is_asan'):
 | 
			
		||||
    create_debug = False
 | 
			
		||||
    msg('Not generating Debug configuration due to is_asan=true')
 | 
			
		||||
 | 
			
		||||
  # Always create x64 configs.
 | 
			
		||||
  if not is_asan:
 | 
			
		||||
  if create_debug:
 | 
			
		||||
    result['Debug_GN_x64'] = GetConfigArgs(args, True, True)
 | 
			
		||||
  result['Release_GN_x64'] = GetConfigArgs(args, False, True)
 | 
			
		||||
 | 
			
		||||
  # Create x86 configs on Windows and on Linux when using the sysroot.
 | 
			
		||||
  if platform == 'windows' or \
 | 
			
		||||
    (platform == 'linux' and GetArgValue(args, 'use_sysroot') == True):
 | 
			
		||||
    if not is_asan:
 | 
			
		||||
    if create_debug:
 | 
			
		||||
      result['Debug_GN_x86'] = GetConfigArgs(args, True, False)
 | 
			
		||||
    result['Release_GN_x86'] = GetConfigArgs(args, False, False)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user