xref: /aosp_15_r20/external/angle/build/config/apple/symbols.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2016 The Chromium Authors
2*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be
3*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file.
4*8975f5c5SAndroid Build Coastguard Worker
5*8975f5c5SAndroid Build Coastguard Workerimport("//build/config/chrome_build.gni")
6*8975f5c5SAndroid Build Coastguard Workerimport("//build/config/sanitizers/sanitizers.gni")
7*8975f5c5SAndroid Build Coastguard Worker
8*8975f5c5SAndroid Build Coastguard Worker# This file declares arguments and configs that control whether dSYM debug
9*8975f5c5SAndroid Build Coastguard Worker# info is produced and whether build products are stripped.
10*8975f5c5SAndroid Build Coastguard Worker
11*8975f5c5SAndroid Build Coastguard Workerdeclare_args() {
12*8975f5c5SAndroid Build Coastguard Worker  # Produce dSYM files for targets that are configured to do so. dSYM
13*8975f5c5SAndroid Build Coastguard Worker  # generation is controlled globally as it is a linker output (produced via
14*8975f5c5SAndroid Build Coastguard Worker  # the //build/toolchain/apple/linker_driver.py. Enabling this will result in
15*8975f5c5SAndroid Build Coastguard Worker  # all shared library, loadable module, and executable targets having a dSYM
16*8975f5c5SAndroid Build Coastguard Worker  # generated.
17*8975f5c5SAndroid Build Coastguard Worker  enable_dsyms = is_official_build || using_sanitizer
18*8975f5c5SAndroid Build Coastguard Worker
19*8975f5c5SAndroid Build Coastguard Worker  # Strip symbols from linked targets by default. If this is enabled, the
20*8975f5c5SAndroid Build Coastguard Worker  # //build/config/apple:strip_all config will be applied to all linked targets.
21*8975f5c5SAndroid Build Coastguard Worker  # If custom stripping parameters are required, remove that config from a
22*8975f5c5SAndroid Build Coastguard Worker  # linked target and apply custom -Wcrl,strip flags. See
23*8975f5c5SAndroid Build Coastguard Worker  # //build/toolchain/apple/linker_driver.py for more information.
24*8975f5c5SAndroid Build Coastguard Worker  enable_stripping = is_official_build
25*8975f5c5SAndroid Build Coastguard Worker}
26*8975f5c5SAndroid Build Coastguard Worker
27*8975f5c5SAndroid Build Coastguard Worker# Save unstripped copies of targets with a ".unstripped" suffix. This is
28*8975f5c5SAndroid Build Coastguard Worker# useful to preserve the original output when enable_stripping=true but
29*8975f5c5SAndroid Build Coastguard Worker# we're not actually generating real dSYMs.
30*8975f5c5SAndroid Build Coastguard Workersave_unstripped_output = enable_stripping && !enable_dsyms
31