From 24573ca3c38e55b8f478a397e5ea2bbb275d118e Mon Sep 17 00:00:00 2001 From: Alexander David Frick Date: Mon, 13 Dec 2021 01:44:24 -0600 Subject: [PATCH] Update BUILD.gn --- build/config/win/BUILD.gn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn index 59aaa84c..dedef589 100644 --- a/build/config/win/BUILD.gn +++ b/build/config/win/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 The Chromium Authors and Alex313031. All rights reserved. +# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -41,6 +41,11 @@ declare_args() { # and with this switch, clang emits it like this: # foo/bar.cc:12:34: error: something went wrong use_clang_diagnostics_format = false + + # Indicates whether to use /pdbpagesize:8192 to allow PDBs larger than 4 GiB. + # This requires updated debugging and profiling tools which are not widely + # distributed yet which is why it is currently opt-in. + use_large_pdbs = false } # This is included by reference in the //build/config/compiler config that @@ -152,6 +157,12 @@ config("compiler") { ldflags += [ "/lldignoreenv" ] } + if (use_large_pdbs) { + # This allows PDBs up to 8 GiB in size. This requires lld-link.exe or + # link.exe from VS 2022 or later. + ldflags += [ "/pdbpagesize:8192" ] + } + if (!is_debug && !is_component_build) { # Enable standard linker optimizations like GC (/OPT:REF) and ICF in static # release builds.