BUILD.gn 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (c) 2013 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/compiler/compiler.gni")
  5. declare_args() {
  6. # Stack traces will not include function names. Instead they will contain
  7. # file and offset information that can be used with
  8. # tools/valgrind/asan/asan_symbolize.py. By piping stderr through this script,
  9. # and also enabling symbol_level = 2, you can get much more detailed stack
  10. # traces with file names and line numbers, even in non-ASAN builds.
  11. print_unsymbolized_stack_traces = is_asan || is_lsan || is_msan || is_tsan
  12. }
  13. static_library("symbolize") {
  14. visibility = [ "//base/*" ]
  15. sources = [
  16. "config.h",
  17. "demangle.cc",
  18. "demangle.h",
  19. "glog/logging.h",
  20. "glog/raw_logging.h",
  21. "symbolize.cc",
  22. "symbolize.h",
  23. "utilities.h",
  24. ]
  25. defines = []
  26. if (print_unsymbolized_stack_traces) {
  27. defines += [ "PRINT_UNSYMBOLIZED_STACK_TRACES" ]
  28. }
  29. configs -= [ "//build/config/compiler:chromium_code" ]
  30. configs += [ "//build/config/compiler:no_chromium_code" ]
  31. }