diff --git a/build/config/compiler/pgo/pgo.gni b/build/config/compiler/pgo/pgo.gni index 9e9a0c524992a..02a2900ebabbe 100644 --- a/build/config/compiler/pgo/pgo.gni +++ b/build/config/compiler/pgo/pgo.gni @@ -19,13 +19,15 @@ declare_args() { # bad compile times. chrome_pgo_phase = 0 if (!dcheck_always_on && is_official_build && - # TODO(crbug.com/1052397): Remove chromeos_is_browser_only once - # target_os switch for lacros-chrome is completed. # TODO(crbug.com/1336055): Update this now-outdated condition with regard # to chromecast and determine whether chromeos_is_browser_only is # obsolete. (is_high_end_android || is_win || is_mac || is_fuchsia || - (is_linux && !is_castos && !chromeos_is_browser_only))) { + (is_linux && !is_castos) || + # TODO(crbug.com/1435082): Currently arm boards are not working. + # Enable this for arm boards, once the lab set up is fixed. + (is_chromeos_lacros && is_chromeos_device && target_cpu != "arm" && + target_cpu != "arm64"))) { chrome_pgo_phase = 2 } diff --git a/build/toolchain/cros/BUILD.gn b/build/toolchain/cros/BUILD.gn index c815e1ab2844a..12b82ee411f36 100644 --- a/build/toolchain/cros/BUILD.gn +++ b/build/toolchain/cros/BUILD.gn @@ -134,6 +134,7 @@ cros_toolchain("nacl_bootstrap") { cc = cros_nacl_helper_arm32_cc cxx = cros_nacl_helper_arm32_cxx ld = cros_nacl_helper_arm32_ld + # Avoid accidental use of Arm64 sysroot because of SYSROOT # env variable set in ChromeOS builds. toolchain_args.sysroot = cros_nacl_helper_arm32_sysroot @@ -278,6 +279,12 @@ if (also_build_lacros_chrome_for_architecture != "") { also_build_lacros_chrome_for_architecture = "" chromeos_is_browser_only = true use_clang_coverage = false + + # Do not propagate AFDO settings from Ash build to Lacros build. + # Specifically, Lacros uses PGO by default, so this would + # conflict. + clang_use_default_sample_profile = false + clang_sample_profile_path = "" } if (!lacros_use_chromium_toolchain) { # These are args for the template.