It has now become an issue for Brave that `PERFETTO_DEFINE_TEST_CATEGORY_PREFIXES` has grown larger enough to cause the whole macro machinery around it to fall apart due to `constexpr` depth evaluation limits. This change bumps constexpr-depth to 1024. A bug has been logged with Chromium to have this tracked in upstream: crbug.com/498698527 Chromium changes: https://chromium.googlesource.com/chromium/src/+/7a9d0ab407d1968885a9185589bbd369401476f8 commit 7a9d0ab407d1968885a9185589bbd369401476f8 Author: Aldo Culquicondor <acondor@chromium.org> Date: Tue Mar 31 17:54:45 2026 -0700 Glic: Add metrics and traces for webui initialization Track the time time from the web contents creation until the navigation commits and from then until the page load completes. Also added a dedicated glic category. Bug: 495451913 Change-Id: I3124c26c9c630d19f381826edec192887fea43bb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7711298 Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Auto-Submit: Aldo Culquicondor <acondor@chromium.org> Commit-Queue: Aldo Culquicondor <acondor@chromium.org> Reviewed-by: Dan Harrington <harringtond@chromium.org> Reviewed-by: Roger McFarlane <rogerm@chromium.org> Cr-Commit-Position: refs/heads/main@{#1608223}
72 lines
2.4 KiB
Plaintext
72 lines
2.4 KiB
Plaintext
# Copyright (c) 2018 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
import("//brave/build/config.gni")
|
|
import("//brave/build/redirect_cc.gni")
|
|
import("//build/config/compiler/compiler.gni")
|
|
|
|
config("brave_chromium_src_support") {
|
|
# Add "//brave/chromium_src" to the quoted include search path using -iquote.
|
|
# This allows all source files to point to Brave overrides via #include "...",
|
|
# while the overrides themselves can reference original Chromium files with
|
|
# #include <...>.
|
|
iquote_flags = []
|
|
if (is_win) {
|
|
# Clang-cl doesn't know -iquote. Prepend -Xclang to make it work.
|
|
iquote_flags += [ "-Xclang" ]
|
|
}
|
|
iquote_flags +=
|
|
[ "-iquote" + rebase_path("//brave/chromium_src", root_build_dir) ]
|
|
|
|
cflags = iquote_flags
|
|
|
|
# Pass iquote_flags to asmflags only if llvm-ml is enabled.
|
|
if (!disable_llvm_ml) {
|
|
# If llvm-ml is disabled, MASM is used instead. MASM doesn't work via
|
|
# redirect_cc, which means we should not pass the iquote_flags to asmflags.
|
|
# An invalid option warning is generated in this case.
|
|
asmflags = iquote_flags
|
|
}
|
|
}
|
|
|
|
# Config to support //base build without redirect_cc to build redirect_cc itself.
|
|
if (is_redirect_cc_build) {
|
|
config("base_build_without_redirect_cc") {
|
|
defines = [
|
|
"BRAVE_GET_TARGET_FOR_DEFAULT_APP_SETTINGS=",
|
|
"BRAVE_HISTOGRAM_FUNCTIONS_UMA_HISTOGRAM_ENUMERATION=",
|
|
"BRAVE_SCOPED_ALLOW_BASE_SYNC_PRIMITIVES_H=",
|
|
"BRAVE_INTERNAL_TRACE_LIST_BUILTIN_CATEGORIES=",
|
|
]
|
|
}
|
|
}
|
|
|
|
config("compiler") {
|
|
cflags = [
|
|
"-Xclang",
|
|
"-fexperimental-max-bitint-width=256",
|
|
]
|
|
|
|
# Perfetto's constexpr category registry (ValidateCategories) recurses once
|
|
# per category. With Brave's extra categories, the total depth now exceeds
|
|
# Clang's default limit of 512 so increase it.
|
|
if (is_win) {
|
|
cflags += [ "/clang:-fconstexpr-depth=1024" ]
|
|
} else {
|
|
cflags += [ "-fconstexpr-depth=1024" ]
|
|
}
|
|
|
|
configs = [ ":brave_chromium_src_support" ]
|
|
if (is_redirect_cc_build) {
|
|
configs -= [ ":brave_chromium_src_support" ]
|
|
configs += [ ":base_build_without_redirect_cc" ]
|
|
}
|
|
}
|
|
|
|
# do not expose this as a public config anywhere
|
|
config("version") {
|
|
defines = [ "BRAVE_CHROMIUM_VERSION=\"$chrome_version_string\"" ]
|
|
}
|