BUILD.gn 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 2018 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("//components/gwp_asan/buildflags/buildflags.gni")
  5. import("//third_party/protobuf/proto_library.gni")
  6. static_library("crash_handler") {
  7. sources = [
  8. "crash_analyzer.cc",
  9. "crash_analyzer.h",
  10. "crash_handler.cc",
  11. "crash_handler.h",
  12. ]
  13. deps = [
  14. ":crash_proto",
  15. "//base",
  16. "//components/gwp_asan/common",
  17. "//third_party/crashpad/crashpad/client",
  18. "//third_party/crashpad/crashpad/handler",
  19. "//third_party/crashpad/crashpad/minidump",
  20. "//third_party/crashpad/crashpad/snapshot",
  21. "//third_party/crashpad/crashpad/util",
  22. "//third_party/protobuf:protobuf_lite",
  23. ]
  24. }
  25. proto_library("crash_proto") {
  26. sources = [ "crash.proto" ]
  27. }
  28. source_set("unit_tests") {
  29. testonly = true
  30. sources = [ "crash_analyzer_unittest.cc" ]
  31. deps = [
  32. ":crash_handler",
  33. ":crash_proto",
  34. "//base/test:test_support",
  35. "//components/gwp_asan/client",
  36. "//components/gwp_asan/common",
  37. "//testing/gmock",
  38. "//testing/gtest",
  39. "//third_party/crashpad/crashpad/client",
  40. "//third_party/crashpad/crashpad/snapshot",
  41. "//third_party/crashpad/crashpad/snapshot:test_support",
  42. "//third_party/crashpad/crashpad/test",
  43. "//third_party/crashpad/crashpad/util",
  44. "//third_party/protobuf:protobuf_lite",
  45. ]
  46. if (!is_android || enable_gwp_asan) {
  47. sources += [ "crash_handler_unittest.cc" ]
  48. deps += [
  49. "//third_party/crashpad/crashpad/handler",
  50. "//third_party/crashpad/crashpad/minidump",
  51. "//third_party/crashpad/crashpad/tools:tool_support",
  52. ]
  53. if (is_android) {
  54. metadata = {
  55. shared_libraries = [ "$root_out_dir/libchrome_crashpad_handler.so" ]
  56. }
  57. deps +=
  58. [ "//components/crash/core/app:chrome_crashpad_handler_named_as_so" ]
  59. }
  60. }
  61. }