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