From 915913bd5a721b26fa5ee6321ab9b26777ae9202 Mon Sep 17 00:00:00 2001 From: Peter Wen Date: Tue, 3 Sep 2024 11:09:14 -0400 Subject: [PATCH] Fix crashpad for PGO generation This GN arg config repros the failure in the bug: ``` chrome_pgo_phase = 1 is_official_build = true target_cpu = "arm64" target_os = "android" use_remoteexec = true ``` Commenting out either is_official_build or chrome_pgo_phase removes the compile error, but since many bots build with is_official_build, the culprit must be chrome_pgo_phase. Bug: chromium:362787700 Change-Id: I536a098693b85ed93c22e38e639b393fcb480e79 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5826154 Reviewed-by: Joshua Peraza --- handler/BUILD.gn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/handler/BUILD.gn b/handler/BUILD.gn index 0b4f1bc5..104e8502 100644 --- a/handler/BUILD.gn +++ b/handler/BUILD.gn @@ -223,10 +223,13 @@ if (crashpad_is_android) { # Chromium's sanitizer runtime libraries do not include an unwinder, # so add Chromium's standard dependencies to link against the in-tree # libunwind. The coverage wrapper similarly requires an unwinder, as - # well as a few other bits from libc++abi. + # well as a few other bits from libc++abi. There are some issues with pgo + # as well. + import("//build/config/compiler/pgo/pgo.gni") import("//build/config/coverage/coverage.gni") import("//build/config/sanitizers/sanitizers.gni") - no_default_deps = !use_clang_coverage && !using_sanitizer + no_default_deps = + !use_clang_coverage && !using_sanitizer && chrome_pgo_phase != 1 remove_configs = [ "//build/config/android:default_orderfile_instrumentation" ] }