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