BUILD.gn 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139
  1. # Copyright 2014 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/chromeos/ui_mode.gni")
  5. import("//build/symlink.gni")
  6. import("//testing/libfuzzer/fuzzer_test.gni")
  7. import("//testing/test.gni")
  8. if (is_win) {
  9. import("//build/config/win/visual_studio_version.gni")
  10. }
  11. config("tools_config") {
  12. include_dirs = [
  13. "breakpad/src",
  14. "breakpad/src/third_party",
  15. ]
  16. if (is_android) {
  17. defines = [ "__ANDROID__" ]
  18. }
  19. if (is_clang) {
  20. cflags = [ "-Wno-tautological-constant-out-of-range-compare" ]
  21. }
  22. }
  23. config("internal_config") {
  24. include_dirs = [ "breakpad/src" ]
  25. defines = []
  26. if (is_debug) {
  27. # This is needed for GTMLogger to work correctly.
  28. defines += [ "DEBUG" ]
  29. }
  30. if (is_android) {
  31. defines += [ "__ANDROID__" ]
  32. }
  33. }
  34. config("client_config") {
  35. include_dirs = [ "breakpad/src" ]
  36. if (is_android) {
  37. include_dirs += [ "breakpad/src/common/android/include" ]
  38. }
  39. if (is_chromeos_ash) {
  40. defines = [ "__CHROMEOS__" ]
  41. }
  42. }
  43. config("handler_config") {
  44. include_dirs = [ "breakpad/src" ]
  45. }
  46. config("sender_config") {
  47. include_dirs = [ "breakpad/src" ]
  48. }
  49. config("breakpad_unittest_config") {
  50. # One of the breakpad unit tests test that we can detect the proper build-id.
  51. # We must override the build-id for this one target.
  52. ldflags = [ "-Wl,--build-id=0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" ]
  53. }
  54. config("default_logging_severity_config") {
  55. defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
  56. }
  57. config("fuzzing_logging_severity_config") {
  58. defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_CRITICAL" ]
  59. }
  60. default_breakpad_configs = [ ":tools_config" ]
  61. if (use_fuzzing_engine) {
  62. default_breakpad_configs += [ ":fuzzing_logging_severity_config" ]
  63. } else {
  64. default_breakpad_configs += [ ":default_logging_severity_config" ]
  65. }
  66. # {micro,mini}dump_stackwalk and minidump_dump are tool-type executables
  67. # that do not build on Windows.
  68. if (!is_win) {
  69. if (current_toolchain == host_toolchain || target_os == "mac") {
  70. # Contains the code shared by both {micro,mini}dump_stackwalk.
  71. static_library("stackwalk_common") {
  72. sources = [
  73. "breakpad/src/common/path_helper.cc",
  74. "breakpad/src/common/path_helper.h",
  75. "breakpad/src/common/scoped_ptr.h",
  76. "breakpad/src/processor/basic_code_module.h",
  77. "breakpad/src/processor/basic_code_modules.cc",
  78. "breakpad/src/processor/basic_code_modules.h",
  79. "breakpad/src/processor/basic_source_line_resolver.cc",
  80. "breakpad/src/processor/call_stack.cc",
  81. "breakpad/src/processor/cfi_frame_info.cc",
  82. "breakpad/src/processor/cfi_frame_info.h",
  83. "breakpad/src/processor/convert_old_arm64_context.cc",
  84. "breakpad/src/processor/convert_old_arm64_context.h",
  85. "breakpad/src/processor/disassembler_x86.cc",
  86. "breakpad/src/processor/disassembler_x86.h",
  87. "breakpad/src/processor/dump_context.cc",
  88. "breakpad/src/processor/dump_object.cc",
  89. "breakpad/src/processor/logging.cc",
  90. "breakpad/src/processor/logging.h",
  91. "breakpad/src/processor/pathname_stripper.cc",
  92. "breakpad/src/processor/pathname_stripper.h",
  93. "breakpad/src/processor/proc_maps_linux.cc",
  94. "breakpad/src/processor/process_state.cc",
  95. "breakpad/src/processor/simple_symbol_supplier.cc",
  96. "breakpad/src/processor/simple_symbol_supplier.h",
  97. "breakpad/src/processor/source_line_resolver_base.cc",
  98. "breakpad/src/processor/stack_frame_cpu.cc",
  99. "breakpad/src/processor/stack_frame_symbolizer.cc",
  100. "breakpad/src/processor/stackwalk_common.cc",
  101. "breakpad/src/processor/stackwalker.cc",
  102. "breakpad/src/processor/stackwalker_amd64.cc",
  103. "breakpad/src/processor/stackwalker_amd64.h",
  104. "breakpad/src/processor/stackwalker_arm.cc",
  105. "breakpad/src/processor/stackwalker_arm.h",
  106. "breakpad/src/processor/stackwalker_arm64.cc",
  107. "breakpad/src/processor/stackwalker_arm64.h",
  108. "breakpad/src/processor/stackwalker_mips.cc",
  109. "breakpad/src/processor/stackwalker_mips.h",
  110. "breakpad/src/processor/stackwalker_ppc.cc",
  111. "breakpad/src/processor/stackwalker_ppc.h",
  112. "breakpad/src/processor/stackwalker_ppc64.cc",
  113. "breakpad/src/processor/stackwalker_ppc64.h",
  114. "breakpad/src/processor/stackwalker_sparc.cc",
  115. "breakpad/src/processor/stackwalker_sparc.h",
  116. "breakpad/src/processor/stackwalker_x86.cc",
  117. "breakpad/src/processor/stackwalker_x86.h",
  118. "breakpad/src/processor/tokenize.cc",
  119. "breakpad/src/processor/tokenize.h",
  120. # libdisasm
  121. "breakpad/src/third_party/libdisasm/ia32_implicit.c",
  122. "breakpad/src/third_party/libdisasm/ia32_implicit.h",
  123. "breakpad/src/third_party/libdisasm/ia32_insn.c",
  124. "breakpad/src/third_party/libdisasm/ia32_insn.h",
  125. "breakpad/src/third_party/libdisasm/ia32_invariant.c",
  126. "breakpad/src/third_party/libdisasm/ia32_invariant.h",
  127. "breakpad/src/third_party/libdisasm/ia32_modrm.c",
  128. "breakpad/src/third_party/libdisasm/ia32_modrm.h",
  129. "breakpad/src/third_party/libdisasm/ia32_opcode_tables.c",
  130. "breakpad/src/third_party/libdisasm/ia32_opcode_tables.h",
  131. "breakpad/src/third_party/libdisasm/ia32_operand.c",
  132. "breakpad/src/third_party/libdisasm/ia32_operand.h",
  133. "breakpad/src/third_party/libdisasm/ia32_reg.c",
  134. "breakpad/src/third_party/libdisasm/ia32_reg.h",
  135. "breakpad/src/third_party/libdisasm/ia32_settings.c",
  136. "breakpad/src/third_party/libdisasm/ia32_settings.h",
  137. "breakpad/src/third_party/libdisasm/libdis.h",
  138. "breakpad/src/third_party/libdisasm/qword.h",
  139. "breakpad/src/third_party/libdisasm/x86_disasm.c",
  140. "breakpad/src/third_party/libdisasm/x86_format.c",
  141. "breakpad/src/third_party/libdisasm/x86_imm.c",
  142. "breakpad/src/third_party/libdisasm/x86_imm.h",
  143. "breakpad/src/third_party/libdisasm/x86_insn.c",
  144. "breakpad/src/third_party/libdisasm/x86_misc.c",
  145. "breakpad/src/third_party/libdisasm/x86_operand_list.c",
  146. "breakpad/src/third_party/libdisasm/x86_operand_list.h",
  147. ]
  148. configs -= [ "//build/config/compiler:chromium_code" ]
  149. configs += [ "//build/config/compiler:no_chromium_code" ]
  150. configs += default_breakpad_configs
  151. }
  152. fuzzer_test("minidump_fuzzer") {
  153. sources = [
  154. "breakpad/src/processor/exploitability.cc",
  155. "breakpad/src/processor/minidump.cc",
  156. "breakpad/src/processor/minidump_processor.cc",
  157. "minidump_fuzzer.cc",
  158. ]
  159. deps = [
  160. ":stackwalk_common",
  161. "//base",
  162. ]
  163. additional_configs = [ ":fuzzing_logging_severity_config" ]
  164. include_dirs = [ "breakpad/src" ]
  165. libfuzzer_options = [
  166. # Suppress stdout from stackwalk_common, as it uses printf() directly.
  167. "close_fd_mask=1",
  168. "max_len=128000",
  169. ]
  170. sources += [
  171. "breakpad/src/processor/exploitability_linux.cc",
  172. "breakpad/src/processor/exploitability_linux.h",
  173. "breakpad/src/processor/exploitability_win.cc",
  174. "breakpad/src/processor/exploitability_win.h",
  175. "breakpad/src/processor/symbolic_constants_win.cc",
  176. "breakpad/src/processor/symbolic_constants_win.h",
  177. ]
  178. }
  179. executable("microdump_stackwalk") {
  180. sources = [
  181. "breakpad/src/processor/microdump.cc",
  182. "breakpad/src/processor/microdump_processor.cc",
  183. "breakpad/src/processor/microdump_stackwalk.cc",
  184. ]
  185. deps = [ ":stackwalk_common" ]
  186. configs -= [ "//build/config/compiler:chromium_code" ]
  187. configs += [ "//build/config/compiler:no_chromium_code" ]
  188. configs += default_breakpad_configs
  189. }
  190. executable("minidump_stackwalk") {
  191. sources = [
  192. "breakpad/src/processor/exploitability.cc",
  193. "breakpad/src/processor/minidump.cc",
  194. "breakpad/src/processor/minidump_processor.cc",
  195. "breakpad/src/processor/minidump_stackwalk.cc",
  196. ]
  197. deps = [ ":stackwalk_common" ]
  198. configs -= [ "//build/config/compiler:chromium_code" ]
  199. configs += [ "//build/config/compiler:no_chromium_code" ]
  200. configs += default_breakpad_configs
  201. sources += [
  202. "breakpad/src/processor/exploitability_linux.cc",
  203. "breakpad/src/processor/exploitability_linux.h",
  204. "breakpad/src/processor/exploitability_win.cc",
  205. "breakpad/src/processor/exploitability_win.h",
  206. "breakpad/src/processor/symbolic_constants_win.cc",
  207. "breakpad/src/processor/symbolic_constants_win.h",
  208. ]
  209. }
  210. executable("minidump_dump") {
  211. sources = [
  212. "breakpad/src/common/path_helper.cc",
  213. "breakpad/src/common/path_helper.h",
  214. "breakpad/src/common/scoped_ptr.h",
  215. "breakpad/src/processor/basic_code_module.h",
  216. "breakpad/src/processor/basic_code_modules.cc",
  217. "breakpad/src/processor/basic_code_modules.h",
  218. "breakpad/src/processor/convert_old_arm64_context.cc",
  219. "breakpad/src/processor/convert_old_arm64_context.h",
  220. "breakpad/src/processor/dump_context.cc",
  221. "breakpad/src/processor/dump_object.cc",
  222. "breakpad/src/processor/logging.cc",
  223. "breakpad/src/processor/logging.h",
  224. "breakpad/src/processor/minidump.cc",
  225. "breakpad/src/processor/minidump_dump.cc",
  226. "breakpad/src/processor/pathname_stripper.cc",
  227. "breakpad/src/processor/pathname_stripper.h",
  228. "breakpad/src/processor/proc_maps_linux.cc",
  229. ]
  230. configs += [ ":tools_config" ]
  231. # There are some warnings in this code.
  232. configs -= [ "//build/config/compiler:chromium_code" ]
  233. configs += [ "//build/config/compiler:no_chromium_code" ]
  234. }
  235. } else {
  236. # Aliases for convenience.
  237. binary_symlink("microdump_stackwalk") {
  238. binary_label = ":$target_name($host_toolchain)"
  239. }
  240. binary_symlink("minidump_stackwalk") {
  241. binary_label = ":$target_name($host_toolchain)"
  242. }
  243. binary_symlink("minidump_dump") {
  244. binary_label = ":$target_name($host_toolchain)"
  245. }
  246. }
  247. }
  248. # Mac --------------------------------------------------------------------------
  249. if (is_mac) {
  250. if (current_toolchain == host_toolchain || target_os != "ios") {
  251. source_set("common") {
  252. sources = [
  253. "breakpad/src/common/dwarf/bytereader.cc",
  254. "breakpad/src/common/dwarf/dwarf2diehandler.cc",
  255. "breakpad/src/common/dwarf/dwarf2reader.cc",
  256. "breakpad/src/common/dwarf/elf_reader.cc",
  257. "breakpad/src/common/dwarf/elf_reader.h",
  258. "breakpad/src/common/dwarf_cfi_to_module.cc",
  259. "breakpad/src/common/dwarf_cu_to_module.cc",
  260. "breakpad/src/common/dwarf_line_to_module.cc",
  261. "breakpad/src/common/dwarf_range_list_handler.cc",
  262. "breakpad/src/common/dwarf_range_list_handler.h",
  263. "breakpad/src/common/language.cc",
  264. "breakpad/src/common/mac/arch_utilities.cc",
  265. "breakpad/src/common/mac/arch_utilities.h",
  266. "breakpad/src/common/mac/dump_syms.cc",
  267. "breakpad/src/common/mac/file_id.cc",
  268. "breakpad/src/common/mac/macho_id.cc",
  269. "breakpad/src/common/mac/macho_reader.cc",
  270. "breakpad/src/common/mac/macho_utilities.cc",
  271. "breakpad/src/common/mac/macho_walker.cc",
  272. "breakpad/src/common/md5.cc",
  273. "breakpad/src/common/memory_range.h",
  274. "breakpad/src/common/module.cc",
  275. "breakpad/src/common/path_helper.cc",
  276. "breakpad/src/common/path_helper.h",
  277. "breakpad/src/common/scoped_ptr.h",
  278. "breakpad/src/common/stabs_reader.cc",
  279. "breakpad/src/common/stabs_to_module.cc",
  280. ]
  281. include_dirs = [ "breakpad/src/common/mac" ]
  282. configs += [ ":internal_config" ]
  283. # The DWARF utilities require -funsigned-char.
  284. cflags = [ "-funsigned-char" ]
  285. # dwarf2reader.cc uses dynamic_cast.
  286. configs -= [ "//build/config/compiler:no_rtti" ]
  287. configs += [ "//build/config/compiler:rtti" ]
  288. configs -= [ "//build/config/compiler:chromium_code" ]
  289. configs += [ "//build/config/compiler:no_chromium_code" ]
  290. # For breakpad/src/common/stabs_reader.h.
  291. defines = [ "HAVE_MACH_O_NLIST_H" ]
  292. }
  293. executable("dump_syms") {
  294. sources = [ "breakpad/src/tools/mac/dump_syms/dump_syms_tool.cc" ]
  295. configs -= [ "//build/config/compiler:chromium_code" ]
  296. configs += [ "//build/config/compiler:no_chromium_code" ]
  297. configs += [ ":internal_config" ]
  298. frameworks = [ "Foundation.framework" ]
  299. deps = [ ":common" ]
  300. }
  301. executable("symupload") {
  302. sources = [
  303. "breakpad/src/common/mac/HTTPGetRequest.m",
  304. "breakpad/src/common/mac/HTTPMultipartUpload.m",
  305. "breakpad/src/common/mac/HTTPPutRequest.m",
  306. "breakpad/src/common/mac/HTTPRequest.m",
  307. "breakpad/src/common/mac/HTTPSimplePostRequest.m",
  308. "breakpad/src/common/mac/SymbolCollectorClient.m",
  309. "breakpad/src/common/mac/encoding_util.m",
  310. "breakpad/src/tools/mac/symupload/symupload.mm",
  311. ]
  312. include_dirs = [ "breakpad/src/common/mac" ]
  313. configs += [ ":internal_config" ]
  314. frameworks = [ "Foundation.framework" ]
  315. configs -= [ "//build/config/compiler:chromium_code" ]
  316. configs += [ "//build/config/compiler:no_chromium_code" ]
  317. deps = [ ":common" ]
  318. }
  319. } else {
  320. binary_symlink("dump_syms") {
  321. binary_label = ":$target_name($host_toolchain)"
  322. }
  323. binary_symlink("symupload") {
  324. binary_label = ":$target_name($host_toolchain)"
  325. }
  326. }
  327. }
  328. if (is_ios) {
  329. binary_symlink("dump_syms") {
  330. binary_label = ":$target_name($host_toolchain)"
  331. }
  332. binary_symlink("symupload") {
  333. binary_label = ":$target_name($host_toolchain)"
  334. }
  335. }
  336. if (is_mac) {
  337. static_library("utilities") {
  338. sources = [
  339. "breakpad/src/client/mac/crash_generation/ConfigFile.mm",
  340. "breakpad/src/client/mac/handler/breakpad_nlist_64.cc",
  341. "breakpad/src/client/mac/handler/dynamic_images.cc",
  342. "breakpad/src/client/mac/handler/minidump_generator.cc",
  343. "breakpad/src/client/minidump_file_writer.cc",
  344. "breakpad/src/common/convert_UTF.cc",
  345. "breakpad/src/common/mac/MachIPC.mm",
  346. "breakpad/src/common/mac/arch_utilities.cc",
  347. "breakpad/src/common/mac/arch_utilities.h",
  348. "breakpad/src/common/mac/bootstrap_compat.cc",
  349. "breakpad/src/common/mac/file_id.cc",
  350. "breakpad/src/common/mac/launch_reporter.cc",
  351. "breakpad/src/common/mac/macho_id.cc",
  352. "breakpad/src/common/mac/macho_utilities.cc",
  353. "breakpad/src/common/mac/macho_walker.cc",
  354. "breakpad/src/common/mac/string_utilities.cc",
  355. "breakpad/src/common/md5.cc",
  356. "breakpad/src/common/scoped_ptr.h",
  357. "breakpad/src/common/simple_string_dictionary.cc",
  358. "breakpad/src/common/string_conversion.cc",
  359. ]
  360. configs += [ ":internal_config" ]
  361. # There are some warnings in this code.
  362. configs -= [ "//build/config/compiler:chromium_code" ]
  363. configs += [ "//build/config/compiler:no_chromium_code" ]
  364. }
  365. executable("crash_inspector") {
  366. sources = [
  367. "breakpad/src/client/mac/crash_generation/Inspector.mm",
  368. "breakpad/src/client/mac/crash_generation/InspectorMain.mm",
  369. ]
  370. # TODO(GYP): 'mac_real_dsym': 1,
  371. include_dirs = [
  372. "breakpad/src/client/apple/Framework",
  373. "breakpad/src/common/mac",
  374. "breakpad/src",
  375. ]
  376. frameworks = [
  377. "CoreServices.framework",
  378. "Foundation.framework",
  379. ]
  380. deps = [ ":utilities" ]
  381. }
  382. # TODO(GYP) this target has some mac_bundle_resources stuff.
  383. # executable("crash_report_sender") {
  384. # }
  385. group("crash_report_sender") {
  386. }
  387. config("breakpad_config") {
  388. include_dirs = [ "breakpad/src/client/apple/Framework" ]
  389. }
  390. static_library("breakpad") {
  391. sources = [
  392. "breakpad/src/client/mac/Framework/Breakpad.mm",
  393. "breakpad/src/client/mac/Framework/OnDemandServer.mm",
  394. "breakpad/src/client/mac/crash_generation/crash_generation_client.cc",
  395. "breakpad/src/client/mac/crash_generation/crash_generation_client.h",
  396. "breakpad/src/client/mac/handler/exception_handler.cc",
  397. "breakpad/src/client/mac/handler/protected_memory_allocator.cc",
  398. ]
  399. configs += [ ":internal_config" ]
  400. public_configs = [ ":breakpad_config" ]
  401. defines = [ "USE_PROTECTED_ALLOCATIONS=1" ]
  402. include_dirs = [ "breakpad/src/client/apple/Framework" ]
  403. # TODO(crbug.com/841631): Breakpad uses bootstrap_subset() and
  404. # bootstrap_create_server(), both of which are deprecated starting in 10.10.
  405. cflags = [ "-Wno-deprecated-declarations" ]
  406. deps = [
  407. ":crash_inspector",
  408. ":crash_report_sender",
  409. ":utilities",
  410. ]
  411. }
  412. group("client") {
  413. public_configs = [ ":client_config" ]
  414. }
  415. }
  416. if (is_linux || is_chromeos || is_android) {
  417. if (current_toolchain == host_toolchain) {
  418. executable("symupload") {
  419. sources = [
  420. "breakpad/src/common/linux/http_upload.cc",
  421. "breakpad/src/common/linux/http_upload.h",
  422. "breakpad/src/common/linux/libcurl_wrapper.cc",
  423. "breakpad/src/common/linux/libcurl_wrapper.h",
  424. "breakpad/src/common/linux/symbol_collector_client.cc",
  425. "breakpad/src/common/linux/symbol_collector_client.h",
  426. "breakpad/src/common/linux/symbol_upload.cc",
  427. "breakpad/src/common/linux/symbol_upload.h",
  428. "breakpad/src/common/path_helper.cc",
  429. "breakpad/src/common/path_helper.h",
  430. "breakpad/src/common/scoped_ptr.h",
  431. "breakpad/src/tools/linux/symupload/sym_upload.cc",
  432. ]
  433. include_dirs = [
  434. "breakpad/src",
  435. "breakpad/src/third_party",
  436. ]
  437. configs += [ ":tools_config" ]
  438. libs = [ "dl" ]
  439. }
  440. # dump_syms is a host tool, so only compile it for the host system.
  441. executable("dump_syms") {
  442. sources = [
  443. "breakpad/src/common/dwarf/bytereader.cc",
  444. "breakpad/src/common/dwarf/dwarf2diehandler.cc",
  445. "breakpad/src/common/dwarf/dwarf2reader.cc",
  446. "breakpad/src/common/dwarf/elf_reader.cc",
  447. "breakpad/src/common/dwarf/elf_reader.h",
  448. "breakpad/src/common/dwarf_cfi_to_module.cc",
  449. "breakpad/src/common/dwarf_cfi_to_module.h",
  450. "breakpad/src/common/dwarf_cu_to_module.cc",
  451. "breakpad/src/common/dwarf_cu_to_module.h",
  452. "breakpad/src/common/dwarf_line_to_module.cc",
  453. "breakpad/src/common/dwarf_line_to_module.h",
  454. "breakpad/src/common/dwarf_range_list_handler.cc",
  455. "breakpad/src/common/dwarf_range_list_handler.h",
  456. "breakpad/src/common/language.cc",
  457. "breakpad/src/common/language.h",
  458. "breakpad/src/common/linux/crc32.cc",
  459. "breakpad/src/common/linux/crc32.h",
  460. "breakpad/src/common/linux/dump_symbols.cc",
  461. "breakpad/src/common/linux/dump_symbols.h",
  462. "breakpad/src/common/linux/elf_symbols_to_module.cc",
  463. "breakpad/src/common/linux/elf_symbols_to_module.h",
  464. "breakpad/src/common/linux/elfutils.cc",
  465. "breakpad/src/common/linux/elfutils.h",
  466. "breakpad/src/common/linux/file_id.cc",
  467. "breakpad/src/common/linux/file_id.h",
  468. "breakpad/src/common/linux/guid_creator.h",
  469. "breakpad/src/common/linux/linux_libc_support.cc",
  470. "breakpad/src/common/linux/linux_libc_support.h",
  471. "breakpad/src/common/linux/memory_mapped_file.cc",
  472. "breakpad/src/common/linux/memory_mapped_file.h",
  473. "breakpad/src/common/memory_allocator.h",
  474. "breakpad/src/common/memory_range.h",
  475. "breakpad/src/common/module.cc",
  476. "breakpad/src/common/module.h",
  477. "breakpad/src/common/path_helper.cc",
  478. "breakpad/src/common/path_helper.h",
  479. "breakpad/src/common/scoped_ptr.h",
  480. "breakpad/src/common/stabs_reader.cc",
  481. "breakpad/src/common/stabs_reader.h",
  482. "breakpad/src/common/stabs_to_module.cc",
  483. "breakpad/src/common/stabs_to_module.h",
  484. "breakpad/src/tools/linux/dump_syms/dump_syms.cc",
  485. ]
  486. # There are some warnings in this code.
  487. configs -= [ "//build/config/compiler:chromium_code" ]
  488. configs += [ "//build/config/compiler:no_chromium_code" ]
  489. # dwarf2reader.cc uses dynamic_cast. Because we don't typically
  490. # don't support RTTI, we enable it for this single target. Since
  491. # dump_syms doesn't share any object files with anything else,
  492. # this doesn't end up polluting Chrome itself.
  493. configs -= [ "//build/config/compiler:no_rtti" ]
  494. configs += [ "//build/config/compiler:rtti" ]
  495. # Breakpad rev 583 introduced this flag.
  496. # Using this define, stabs_reader.h will include a.out.h to
  497. # build on Linux.
  498. defines = [ "HAVE_A_OUT_H" ]
  499. include_dirs = [ "breakpad/src" ]
  500. }
  501. } else {
  502. # Aliases for convenience.
  503. binary_symlink("dump_syms") {
  504. binary_label = ":dump_syms($host_toolchain)"
  505. }
  506. binary_symlink("symupload") {
  507. binary_label = ":symupload($host_toolchain)"
  508. }
  509. }
  510. static_library("client") {
  511. sources = [
  512. "breakpad/src/client/linux/crash_generation/crash_generation_client.cc",
  513. "breakpad/src/client/linux/crash_generation/crash_generation_client.h",
  514. "breakpad/src/client/linux/dump_writer_common/mapping_info.h",
  515. "breakpad/src/client/linux/dump_writer_common/thread_info.cc",
  516. "breakpad/src/client/linux/dump_writer_common/thread_info.h",
  517. "breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc",
  518. "breakpad/src/client/linux/dump_writer_common/ucontext_reader.h",
  519. "breakpad/src/client/linux/handler/exception_handler.cc",
  520. "breakpad/src/client/linux/handler/exception_handler.h",
  521. "breakpad/src/client/linux/handler/minidump_descriptor.cc",
  522. "breakpad/src/client/linux/handler/minidump_descriptor.h",
  523. "breakpad/src/client/linux/log/log.cc",
  524. "breakpad/src/client/linux/log/log.h",
  525. "breakpad/src/client/linux/microdump_writer/microdump_writer.cc",
  526. "breakpad/src/client/linux/microdump_writer/microdump_writer.h",
  527. "breakpad/src/client/linux/minidump_writer/cpu_set.h",
  528. "breakpad/src/client/linux/minidump_writer/directory_reader.h",
  529. "breakpad/src/client/linux/minidump_writer/line_reader.h",
  530. "breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc",
  531. "breakpad/src/client/linux/minidump_writer/linux_core_dumper.h",
  532. "breakpad/src/client/linux/minidump_writer/linux_dumper.cc",
  533. "breakpad/src/client/linux/minidump_writer/linux_dumper.h",
  534. "breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc",
  535. "breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.h",
  536. "breakpad/src/client/linux/minidump_writer/minidump_writer.cc",
  537. "breakpad/src/client/linux/minidump_writer/minidump_writer.h",
  538. "breakpad/src/client/linux/minidump_writer/pe_file.cc",
  539. "breakpad/src/client/linux/minidump_writer/pe_file.h",
  540. "breakpad/src/client/linux/minidump_writer/pe_structs.h",
  541. "breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader.h",
  542. "breakpad/src/client/minidump_file_writer-inl.h",
  543. "breakpad/src/client/minidump_file_writer.cc",
  544. "breakpad/src/client/minidump_file_writer.h",
  545. "breakpad/src/common/convert_UTF.cc",
  546. "breakpad/src/common/convert_UTF.h",
  547. "breakpad/src/common/linux/breakpad_getcontext.S",
  548. "breakpad/src/common/linux/elf_core_dump.cc",
  549. "breakpad/src/common/linux/elf_core_dump.h",
  550. "breakpad/src/common/linux/elfutils.cc",
  551. "breakpad/src/common/linux/elfutils.h",
  552. "breakpad/src/common/linux/file_id.cc",
  553. "breakpad/src/common/linux/file_id.h",
  554. "breakpad/src/common/linux/google_crashdump_uploader.cc",
  555. "breakpad/src/common/linux/google_crashdump_uploader.h",
  556. "breakpad/src/common/linux/guid_creator.cc",
  557. "breakpad/src/common/linux/guid_creator.h",
  558. "breakpad/src/common/linux/libcurl_wrapper.cc",
  559. "breakpad/src/common/linux/libcurl_wrapper.h",
  560. "breakpad/src/common/linux/linux_libc_support.cc",
  561. "breakpad/src/common/linux/linux_libc_support.h",
  562. "breakpad/src/common/linux/memory_mapped_file.cc",
  563. "breakpad/src/common/linux/memory_mapped_file.h",
  564. "breakpad/src/common/linux/safe_readlink.cc",
  565. "breakpad/src/common/linux/safe_readlink.h",
  566. "breakpad/src/common/memory_allocator.h",
  567. "breakpad/src/common/memory_range.h",
  568. "breakpad/src/common/scoped_ptr.h",
  569. "breakpad/src/common/simple_string_dictionary.cc",
  570. "breakpad/src/common/simple_string_dictionary.h",
  571. "breakpad/src/common/string_conversion.cc",
  572. "breakpad/src/common/string_conversion.h",
  573. ]
  574. configs -= [ "//build/config/compiler:chromium_code" ]
  575. configs += [ "//build/config/compiler:no_chromium_code" ]
  576. public_configs = [ ":client_config" ]
  577. if (current_cpu == "arm" && is_chromeos_ash) {
  578. # Avoid running out of registers in
  579. # linux_syscall_support.h:sys_clone()'s inline assembly.
  580. cflags = [ "-marm" ]
  581. }
  582. libs = [ "dl" ]
  583. include_dirs = [
  584. ".",
  585. "breakpad/src",
  586. "breakpad/src/client",
  587. "breakpad/src/third_party/linux/include",
  588. ]
  589. }
  590. static_library("processor_support") {
  591. sources = [
  592. "breakpad/src/common/scoped_ptr.h",
  593. "breakpad/src/processor/basic_code_module.h",
  594. "breakpad/src/processor/basic_code_modules.cc",
  595. "breakpad/src/processor/basic_code_modules.h",
  596. "breakpad/src/processor/convert_old_arm64_context.cc",
  597. "breakpad/src/processor/convert_old_arm64_context.h",
  598. "breakpad/src/processor/dump_context.cc",
  599. "breakpad/src/processor/dump_object.cc",
  600. "breakpad/src/processor/logging.cc",
  601. "breakpad/src/processor/logging.h",
  602. "breakpad/src/processor/minidump.cc",
  603. "breakpad/src/processor/pathname_stripper.cc",
  604. "breakpad/src/processor/pathname_stripper.h",
  605. "breakpad/src/processor/proc_maps_linux.cc",
  606. ]
  607. include_dirs = [
  608. "breakpad/src",
  609. "breakpad/src/client",
  610. "breakpad/src/third_party/linux/include",
  611. ".",
  612. ]
  613. # There are some warnings in this code.
  614. configs -= [ "//build/config/compiler:chromium_code" ]
  615. configs += [ "//build/config/compiler:no_chromium_code" ]
  616. }
  617. test("breakpad_unittests") {
  618. sources = [
  619. "breakpad/src/client/linux/handler/exception_handler_unittest.cc",
  620. "breakpad/src/client/linux/minidump_writer/cpu_set_unittest.cc",
  621. "breakpad/src/client/linux/minidump_writer/directory_reader_unittest.cc",
  622. "breakpad/src/client/linux/minidump_writer/line_reader_unittest.cc",
  623. "breakpad/src/client/linux/minidump_writer/linux_core_dumper_unittest.cc",
  624. "breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc",
  625. "breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc",
  626. "breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc",
  627. "breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc",
  628. "breakpad/src/common/linux/breakpad_getcontext_unittest.cc",
  629. "breakpad/src/common/linux/elf_core_dump_unittest.cc",
  630. "breakpad/src/common/linux/file_id_unittest.cc",
  631. "breakpad/src/common/linux/linux_libc_support_unittest.cc",
  632. "breakpad/src/common/linux/synth_elf.cc",
  633. "breakpad/src/common/linux/tests/auto_testfile.h",
  634. "breakpad/src/common/linux/tests/crash_generator.cc",
  635. "breakpad/src/common/linux/tests/crash_generator.h",
  636. "breakpad/src/common/memory_allocator_unittest.cc",
  637. "breakpad/src/common/memory_range.h",
  638. "breakpad/src/common/simple_string_dictionary_unittest.cc",
  639. "breakpad/src/common/test_assembler.cc",
  640. "breakpad/src/common/tests/file_utils.cc",
  641. "breakpad/src/common/tests/file_utils.h",
  642. "breakpad/src/tools/linux/md2core/minidump_memory_range.h",
  643. "breakpad/src/tools/linux/md2core/minidump_memory_range_unittest.cc",
  644. "linux/breakpad_googletest_includes.h",
  645. ]
  646. deps = [
  647. ":client",
  648. ":processor_support",
  649. "//testing/gmock",
  650. "//testing/gtest",
  651. "//testing/gtest:gtest_main",
  652. ]
  653. data_deps = [ ":linux_dumper_unittest_helper" ]
  654. include_dirs = [
  655. "linux", # Use our copy of breakpad_googletest_includes.h
  656. ".",
  657. ]
  658. # There are some warnings in this code.
  659. configs -= [ "//build/config/compiler:chromium_code" ]
  660. configs += [
  661. ":client_config",
  662. "//build/config/compiler:no_chromium_code",
  663. ]
  664. if (is_clang) {
  665. # See https://crbug.com/138571#c18
  666. cflags = [ "-Wno-unused-value" ]
  667. }
  668. if (is_android) {
  669. use_raw_android_executable = true
  670. libs = [ "log" ]
  671. extra_dist_files = [ "$root_out_dir/linux_dumper_unittest_helper" ]
  672. }
  673. # Add the breakpad unittest config at the end to override all configs.
  674. configs += [ ":breakpad_unittest_config" ]
  675. }
  676. executable("linux_dumper_unittest_helper") {
  677. testonly = true
  678. sources = [ "breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc" ]
  679. deps = [ ":processor_support" ]
  680. configs += [ ":client_config" ]
  681. if (is_component_build) {
  682. ldflags = [ "-Wl,-rpath,\$ORIGIN" ]
  683. }
  684. }
  685. executable("generate_test_dump") {
  686. testonly = true
  687. sources = [ "linux/generate-test-dump.cc" ]
  688. # This file has an unused variable warning.
  689. configs -= [ "//build/config/compiler:chromium_code" ]
  690. configs += [
  691. ":client_config",
  692. "//build/config/compiler:no_chromium_code",
  693. ]
  694. deps = [ ":client" ]
  695. if (is_android) {
  696. libs = [ "log" ]
  697. }
  698. }
  699. executable("minidump-2-core") {
  700. sources = [
  701. "breakpad/src/common/path_helper.cc",
  702. "breakpad/src/common/path_helper.h",
  703. "breakpad/src/tools/linux/md2core/minidump-2-core.cc",
  704. "breakpad/src/tools/linux/md2core/minidump_memory_range.h",
  705. ]
  706. include_dirs = [ "breakpad/src" ]
  707. deps = [ ":client" ]
  708. }
  709. executable("core-2-minidump") {
  710. sources = [
  711. "breakpad/src/common/path_helper.cc",
  712. "breakpad/src/common/path_helper.h",
  713. "breakpad/src/tools/linux/core2md/core2md.cc",
  714. ]
  715. deps = [ ":client" ]
  716. include_dirs = [ "breakpad/src" ]
  717. }
  718. }
  719. if (is_win) {
  720. # Force a native symupload, since Chrome tries to be "helpful" and not really
  721. # differentiate target vs. host for x86/x64 builds.
  722. #
  723. # Normally, this would just use the (current_toolchain == host_toolchain)
  724. # condition, which would cause these targets to only be compiled for the host
  725. # CPU (i.e. to only build "native" binaries), but the Chrome Windows build
  726. # will "always use the target CPU for host builds for x86/x64":
  727. # https://crrev.com/3258ed4d9d755a3564d98bef8707bbdb5f8a7974/config/BUILDCONFIG.gn#199
  728. # This means that host_toolchain will be x86 (32-bit) if the target is x86,
  729. # even when the host is actually x64 (64-bit), which causes this to create
  730. # 32-bit binaries, despite wanting native, 64-bit binaries.
  731. #
  732. # Adding the second condition enables this block for the "true" host
  733. # toolchain as well, which allows creating 64-bit binaries even when the host
  734. # toolchain is redefined to a 32-bit target.
  735. if (is_clang) {
  736. symupload_toolchain = "//build/toolchain/win:win_clang_$host_cpu"
  737. } else {
  738. symupload_toolchain = "//build/toolchain/win:$host_cpu"
  739. }
  740. if (current_toolchain == host_toolchain ||
  741. current_toolchain == symupload_toolchain) {
  742. static_library("common_windows") {
  743. include_dirs = [
  744. "$visual_studio_path/DIA SDK/include",
  745. "breakpad/src",
  746. ]
  747. sources = [
  748. "breakpad/src/common/windows/dia_util.cc",
  749. "breakpad/src/common/windows/dia_util.h",
  750. "breakpad/src/common/windows/guid_string.cc",
  751. "breakpad/src/common/windows/guid_string.h",
  752. "breakpad/src/common/windows/http_upload.cc",
  753. "breakpad/src/common/windows/http_upload.h",
  754. "breakpad/src/common/windows/module_info.h",
  755. "breakpad/src/common/windows/omap.cc",
  756. "breakpad/src/common/windows/omap.h",
  757. "breakpad/src/common/windows/omap_internal.h",
  758. "breakpad/src/common/windows/pdb_source_line_writer.cc",
  759. "breakpad/src/common/windows/pdb_source_line_writer.h",
  760. "breakpad/src/common/windows/pe_source_line_writer.cc",
  761. "breakpad/src/common/windows/pe_source_line_writer.h",
  762. "breakpad/src/common/windows/pe_util.cc",
  763. "breakpad/src/common/windows/pe_util.h",
  764. "breakpad/src/common/windows/string_utils-inl.h",
  765. "breakpad/src/common/windows/string_utils.cc",
  766. "breakpad/src/common/windows/sym_upload_v2_protocol.cc",
  767. "breakpad/src/common/windows/sym_upload_v2_protocol.h",
  768. "breakpad/src/common/windows/symbol_collector_client.cc",
  769. "breakpad/src/common/windows/symbol_collector_client.h",
  770. ]
  771. }
  772. static_library("ms_symbol_server_converter") {
  773. include_dirs = [
  774. "$visual_studio_path/DIA SDK/include",
  775. "breakpad/src",
  776. ]
  777. sources = [
  778. "breakpad/src/tools/windows/converter/ms_symbol_server_converter.cc",
  779. ]
  780. deps = [ "//third_party/breakpad:common_windows" ]
  781. libs = [ "Pathcch.lib" ]
  782. }
  783. executable("dump_syms") {
  784. # TODO(scottmg) using this with VS2015 may break the crash server.
  785. # https://crbug.com/696671
  786. include_dirs = [
  787. "$visual_studio_path/DIA SDK/include",
  788. "breakpad/src",
  789. ]
  790. sources = [ "breakpad/src/tools/windows/dump_syms/dump_syms.cc" ]
  791. deps = [ "//third_party/breakpad:common_windows" ]
  792. lib_dirs = []
  793. if (current_cpu == "x64") {
  794. lib_dirs += [ "$visual_studio_path/DIA SDK/lib/amd64" ]
  795. } else {
  796. lib_dirs += [ "$visual_studio_path/DIA SDK/lib" ]
  797. }
  798. libs = [
  799. "diaguids.lib",
  800. "imagehlp.lib",
  801. ]
  802. if (is_clang) {
  803. # clang complains about microsoft-specific goto extensions. Instead of
  804. # rewriting decade-old, goto-ridden code, disable the warning.
  805. cflags = [ "-Wno-microsoft-goto" ]
  806. }
  807. }
  808. group("symupload") {
  809. deps = [ ":symupload_win($symupload_toolchain)" ]
  810. }
  811. executable("symupload_win") {
  812. include_dirs = [
  813. "$visual_studio_path/DIA SDK/include",
  814. "breakpad/src",
  815. ]
  816. output_name = "symupload"
  817. # Invert the normal logic which puts binaries built with the default
  818. # (target) toolchain into the root output directory, and other toolchain
  819. # binaries into subdirs. This gives preference to the native symupload,
  820. # which is what's wanted in most situations. The cross-compiled binary
  821. # can still be created (by building "symupload_win" instead of
  822. # "symupload") and found in the corresponding toolchain subdir (e.g.
  823. # //out/Release/win_clang_x86/ when cross-compiling to x86).
  824. if (current_toolchain == symupload_toolchain) {
  825. output_dir = "$root_build_dir"
  826. } else {
  827. output_name = "symupload_$target_cpu"
  828. toolchain_parts =
  829. string_split(get_path_info(current_toolchain, "name"), ":")
  830. output_dir = "$root_out_dir/" + toolchain_parts[1]
  831. }
  832. sources = [ "breakpad/src/tools/windows/symupload/symupload.cc" ]
  833. deps = [ "//third_party/breakpad:common_windows" ]
  834. ldflags = [ "/LARGEADDRESSAWARE" ]
  835. lib_dirs = []
  836. if (current_cpu == "x64") {
  837. lib_dirs += [ "$visual_studio_path/DIA SDK/lib/amd64" ]
  838. } else {
  839. lib_dirs += [ "$visual_studio_path/DIA SDK/lib" ]
  840. }
  841. libs = [
  842. "diaguids.lib",
  843. "imagehlp.lib",
  844. ]
  845. if (is_clang) {
  846. # clang complains about microsoft-specific goto extensions. Instead of
  847. # rewriting decade-old, goto-ridden code, disable the warning.
  848. cflags = [ "-Wno-microsoft-goto" ]
  849. }
  850. }
  851. executable("google_converter") {
  852. include_dirs = [
  853. "$visual_studio_path/DIA SDK/include",
  854. "breakpad/src",
  855. ]
  856. sources = [
  857. "breakpad/src/tools/windows/converter_exe/converter.cc",
  858. "breakpad/src/tools/windows/converter_exe/escaping.cc",
  859. "breakpad/src/tools/windows/converter_exe/escaping.h",
  860. "breakpad/src/tools/windows/converter_exe/http_download.cc",
  861. "breakpad/src/tools/windows/converter_exe/tokenizer.cc",
  862. "breakpad/src/tools/windows/converter_exe/winhttp_client.cc",
  863. "breakpad/src/tools/windows/converter_exe/wininet_client.cc",
  864. ]
  865. deps = [
  866. "//third_party/breakpad:common_windows",
  867. "//third_party/breakpad:ms_symbol_server_converter",
  868. ]
  869. ldflags = [
  870. "/DELAYLOAD:dbghelp.dll",
  871. "/DELAYLOAD:dwmapi.dll",
  872. "/DELAYLOAD:uxtheme.dll",
  873. ]
  874. lib_dirs = []
  875. if (current_cpu == "x64") {
  876. lib_dirs += [ "$visual_studio_path/DIA SDK/lib/amd64" ]
  877. } else {
  878. lib_dirs += [ "$visual_studio_path/DIA SDK/lib" ]
  879. }
  880. libs = [
  881. "diaguids.lib",
  882. "imagehlp.lib",
  883. ]
  884. if (is_clang) {
  885. # clang complains about microsoft-specific goto extensions. Instead of
  886. # rewriting decade-old, goto-ridden code, disable the warning.
  887. cflags = [ "-Wno-microsoft-goto" ]
  888. }
  889. }
  890. } else {
  891. # handle dump_syms appropriately for Windows cross build when necessary,
  892. # such as symlinking.
  893. }
  894. }
  895. if (is_ios) {
  896. static_library("client") {
  897. sources = [
  898. "breakpad/src/client/ios/Breakpad.h",
  899. "breakpad/src/client/ios/Breakpad.mm",
  900. "breakpad/src/client/ios/BreakpadController.h",
  901. "breakpad/src/client/ios/BreakpadController.mm",
  902. "breakpad/src/client/ios/handler/ios_exception_minidump_generator.h",
  903. "breakpad/src/client/ios/handler/ios_exception_minidump_generator.mm",
  904. "breakpad/src/client/mac/crash_generation/ConfigFile.h",
  905. "breakpad/src/client/mac/crash_generation/ConfigFile.mm",
  906. "breakpad/src/client/mac/handler/breakpad_nlist_64.cc",
  907. "breakpad/src/client/mac/handler/breakpad_nlist_64.h",
  908. "breakpad/src/client/mac/handler/dynamic_images.cc",
  909. "breakpad/src/client/mac/handler/dynamic_images.h",
  910. "breakpad/src/client/mac/handler/exception_handler.cc",
  911. "breakpad/src/client/mac/handler/exception_handler.h",
  912. "breakpad/src/client/mac/handler/minidump_generator.cc",
  913. "breakpad/src/client/mac/handler/minidump_generator.h",
  914. "breakpad/src/client/mac/handler/protected_memory_allocator.cc",
  915. "breakpad/src/client/mac/handler/protected_memory_allocator.h",
  916. "breakpad/src/client/mac/sender/uploader.h",
  917. "breakpad/src/client/mac/sender/uploader.mm",
  918. "breakpad/src/client/minidump_file_writer-inl.h",
  919. "breakpad/src/client/minidump_file_writer.cc",
  920. "breakpad/src/client/minidump_file_writer.h",
  921. "breakpad/src/common/convert_UTF.cc",
  922. "breakpad/src/common/convert_UTF.h",
  923. "breakpad/src/common/long_string_dictionary.cc",
  924. "breakpad/src/common/mac/HTTPMultipartUpload.m",
  925. "breakpad/src/common/mac/HTTPRequest.m",
  926. "breakpad/src/common/mac/encoding_util.m",
  927. "breakpad/src/common/mac/file_id.cc",
  928. "breakpad/src/common/mac/file_id.h",
  929. "breakpad/src/common/mac/macho_id.cc",
  930. "breakpad/src/common/mac/macho_id.h",
  931. "breakpad/src/common/mac/macho_utilities.cc",
  932. "breakpad/src/common/mac/macho_utilities.h",
  933. "breakpad/src/common/mac/macho_walker.cc",
  934. "breakpad/src/common/mac/macho_walker.h",
  935. "breakpad/src/common/mac/string_utilities.cc",
  936. "breakpad/src/common/mac/string_utilities.h",
  937. "breakpad/src/common/md5.cc",
  938. "breakpad/src/common/md5.h",
  939. "breakpad/src/common/simple_string_dictionary.cc",
  940. "breakpad/src/common/simple_string_dictionary.h",
  941. "breakpad/src/common/string_conversion.cc",
  942. "breakpad/src/common/string_conversion.h",
  943. "breakpad/src/google_breakpad/common/minidump_format.h",
  944. ]
  945. include_dirs = [
  946. "breakpad/src",
  947. "breakpad/src/client/mac/Framework",
  948. "breakpad/src/common/mac",
  949. ]
  950. public_configs = [ ":client_config" ]
  951. if (is_clang) {
  952. # See https://crbug.com/google-breakpad/675.
  953. cflags = [ "-Wno-deprecated-declarations" ]
  954. }
  955. }
  956. }
  957. if (is_win) {
  958. group("client") {
  959. public_configs = [ ":client_config" ]
  960. }
  961. config("breakpad_handler_warnings") {
  962. if (is_clang) {
  963. # See https://crbug.com/google-breakpad/658.
  964. cflags = [ "-Wno-reorder" ]
  965. }
  966. }
  967. static_library("breakpad_handler") {
  968. configs += [ ":handler_config" ]
  969. if (is_win) {
  970. public_configs = [ ":handler_config" ]
  971. }
  972. defines = [ "BREAKPAD_NO_TERMINATE_THREAD" ]
  973. sources = [
  974. "breakpad/src/client/windows/crash_generation/client_info.cc",
  975. "breakpad/src/client/windows/crash_generation/client_info.h",
  976. "breakpad/src/client/windows/crash_generation/crash_generation_client.cc",
  977. "breakpad/src/client/windows/crash_generation/crash_generation_client.h",
  978. "breakpad/src/client/windows/crash_generation/crash_generation_server.cc",
  979. "breakpad/src/client/windows/crash_generation/crash_generation_server.h",
  980. "breakpad/src/client/windows/crash_generation/minidump_generator.cc",
  981. "breakpad/src/client/windows/crash_generation/minidump_generator.h",
  982. "breakpad/src/client/windows/handler/exception_handler.cc",
  983. "breakpad/src/client/windows/handler/exception_handler.h",
  984. "breakpad/src/common/windows/guid_string.cc",
  985. "breakpad/src/common/windows/guid_string.h",
  986. "breakpad/src/common/windows/string_utils-inl.h",
  987. "breakpad/src/google_breakpad/common/minidump_format.h",
  988. ]
  989. configs += [ ":breakpad_handler_warnings" ]
  990. }
  991. source_set("breakpad_sender") {
  992. sources = [
  993. "breakpad/src/client/windows/sender/crash_report_sender.cc",
  994. "breakpad/src/client/windows/sender/crash_report_sender.h",
  995. "breakpad/src/common/windows/http_upload.cc",
  996. "breakpad/src/common/windows/http_upload.h",
  997. "breakpad/src/common/windows/string_utils-inl.h",
  998. ]
  999. configs += [ ":sender_config" ]
  1000. public_configs = [ ":sender_config" ]
  1001. }
  1002. }