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