1# Copyright 2016 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/cast.gni") 6import("//build/config/chrome_build.gni") 7import("//build/config/chromeos/ui_mode.gni") 8import("//build/config/cronet/config.gni") 9import("//build/config/dcheck_always_on.gni") 10import("//build/config/features.gni") 11import("//build/config/ios/config.gni") 12 13declare_args() { 14 # Specify the current PGO phase. 15 # Here's the different values that can be used: 16 # 0 : Means that PGO is turned off. 17 # 1 : Used during the PGI (instrumentation) phase. 18 # 2 : Used during the PGO (optimization) phase. 19 # PGO profiles are generated from `dcheck_always_on = false` builds. Mixing 20 # those profiles with `dcheck_always_on = true` builds can cause the compiler 21 # to think some code is hotter than it actually is, potentially causing very 22 # bad compile times. 23 chrome_pgo_phase = 0 24 if (!is_cronet_build && !dcheck_always_on && is_official_build && 25 # TODO(crbug.com/1336055): Update this now-outdated condition with regard 26 # to chromecast and determine whether chromeos_is_browser_only is 27 # obsolete. 28 (is_high_end_android || is_win || is_mac || is_fuchsia || 29 (is_linux && !is_castos) || 30 (is_ios && use_blink && target_environment == "device") || 31 (is_chromeos_lacros && is_chromeos_device))) { 32 chrome_pgo_phase = 2 33 } 34 35 # When using chrome_pgo_phase = 2, read profile data from this path. 36 pgo_data_path = "" 37} 38