1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2019 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/compiler/compiler.gni") 6*8975f5c5SAndroid Build Coastguard Worker 7*8975f5c5SAndroid Build Coastguard Workerdeclare_args() { 8*8975f5c5SAndroid Build Coastguard Worker # Stack traces will not include function names. Instead they will contain 9*8975f5c5SAndroid Build Coastguard Worker # file and offset information that can be used with 10*8975f5c5SAndroid Build Coastguard Worker # tools/valgrind/asan/asan_symbolize.py. By piping stderr through this script, 11*8975f5c5SAndroid Build Coastguard Worker # and also enabling symbol_level = 2, you can get much more detailed stack 12*8975f5c5SAndroid Build Coastguard Worker # traces with file names and line numbers, even in non-ASAN builds. 13*8975f5c5SAndroid Build Coastguard Worker print_unsymbolized_stack_traces = is_asan || is_lsan || is_msan || is_tsan 14*8975f5c5SAndroid Build Coastguard Worker 15*8975f5c5SAndroid Build Coastguard Worker # Enables the DWARF line number reader on Linux. This only has an effect if 16*8975f5c5SAndroid Build Coastguard Worker # print_unsymbolized_stack_traces is false. 17*8975f5c5SAndroid Build Coastguard Worker enable_stack_trace_line_numbers = symbol_level > 0 18*8975f5c5SAndroid Build Coastguard Worker} 19