Update BUILD.gn

This commit is contained in:
Alexander David Frick 2021-12-13 01:44:24 -06:00 committed by GitHub
parent 7769408a06
commit 24573ca3c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.