From e1aa94c59e6fc5514e7867170a5e665e048937d7 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Sun, 25 May 2025 16:36:41 +0200 Subject: [PATCH] Permit PGO for debug builds: allow the use of pgo even in debug builds, since in cromite clang does not crash and the version without pgo is really too slow --- build/cromite_patches_list.txt | 1 + .../patches/Permit-PGO-for-debug-builds.patch | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 build/patches/Permit-PGO-for-debug-builds.patch diff --git a/build/cromite_patches_list.txt b/build/cromite_patches_list.txt index 10779853..cabdd877 100644 --- a/build/cromite_patches_list.txt +++ b/build/cromite_patches_list.txt @@ -3,6 +3,7 @@ Do-not-check-for-the-presence-of-use-remoteexec.patch bromite-build-utils.patch Add-cromite-flags-support.patch Force-use-vpython3-for-some-scripts.patch +Permit-PGO-for-debug-builds.patch Fix-chromium-vanilla.patch Final-patch-for-chromium-vanilla.patch diff --git a/build/patches/Permit-PGO-for-debug-builds.patch b/build/patches/Permit-PGO-for-debug-builds.patch new file mode 100644 index 00000000..c53053e9 --- /dev/null +++ b/build/patches/Permit-PGO-for-debug-builds.patch @@ -0,0 +1,21 @@ +From: uazo +Date: Sun, 25 May 2025 12:42:26 +0000 +Subject: Permit PGO for debug builds + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + build/config/compiler/pgo/pgo.gni | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/build/config/compiler/pgo/pgo.gni b/build/config/compiler/pgo/pgo.gni +--- a/build/config/compiler/pgo/pgo.gni ++++ b/build/config/compiler/pgo/pgo.gni +@@ -43,5 +43,5 @@ declare_args() { + + # TODO(crbug.com/409738601): Remove assert once clang no + # longer crashes with PGO enabled for a debug build. +-assert(!is_debug || chrome_pgo_phase == 0, +- "Cannot have a debug build optimized with PGO") ++# assert(!is_debug || chrome_pgo_phase == 0, ++# "Cannot have a debug build optimized with PGO") +--