snapshot.gyp 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. # Copyright 2014 The Crashpad Authors. All rights reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. {
  15. 'includes': [
  16. '../build/crashpad.gypi',
  17. ],
  18. 'targets': [
  19. {
  20. 'target_name': 'crashpad_snapshot',
  21. 'type': 'static_library',
  22. 'dependencies': [
  23. '../client/client.gyp:crashpad_client',
  24. '../compat/compat.gyp:crashpad_compat',
  25. '../third_party/mini_chromium/mini_chromium.gyp:base',
  26. '../util/util.gyp:crashpad_util',
  27. ],
  28. 'include_dirs': [
  29. '..',
  30. ],
  31. 'sources': [
  32. 'annotation_snapshot.cc',
  33. 'annotation_snapshot.h',
  34. 'capture_memory.cc',
  35. 'capture_memory.h',
  36. 'cpu_architecture.h',
  37. 'cpu_context.cc',
  38. 'cpu_context.h',
  39. 'crashpad_info_client_options.cc',
  40. 'crashpad_info_client_options.h',
  41. 'elf/elf_dynamic_array_reader.cc',
  42. 'elf/elf_dynamic_array_reader.h',
  43. 'elf/elf_image_reader.cc',
  44. 'elf/elf_image_reader.h',
  45. 'elf/elf_symbol_table_reader.cc',
  46. 'elf/elf_symbol_table_reader.h',
  47. 'exception_snapshot.h',
  48. 'handle_snapshot.cc',
  49. 'handle_snapshot.h',
  50. 'linux/cpu_context_linux.cc',
  51. 'linux/cpu_context_linux.h',
  52. 'linux/debug_rendezvous.cc',
  53. 'linux/debug_rendezvous.h',
  54. 'linux/exception_snapshot_linux.cc',
  55. 'linux/exception_snapshot_linux.h',
  56. 'linux/memory_snapshot_linux.cc',
  57. 'linux/memory_snapshot_linux.h',
  58. 'linux/process_reader.cc',
  59. 'linux/process_reader.h',
  60. 'linux/process_snapshot_linux.cc',
  61. 'linux/process_snapshot_linux.h',
  62. 'linux/signal_context.h',
  63. 'linux/system_snapshot_linux.cc',
  64. 'linux/system_snapshot_linux.h',
  65. 'linux/thread_snapshot_linux.cc',
  66. 'linux/thread_snapshot_linux.h',
  67. 'mac/cpu_context_mac.cc',
  68. 'mac/cpu_context_mac.h',
  69. 'mac/exception_snapshot_mac.cc',
  70. 'mac/exception_snapshot_mac.h',
  71. 'mac/mach_o_image_annotations_reader.cc',
  72. 'mac/mach_o_image_annotations_reader.h',
  73. 'mac/mach_o_image_reader.cc',
  74. 'mac/mach_o_image_reader.h',
  75. 'mac/mach_o_image_segment_reader.cc',
  76. 'mac/mach_o_image_segment_reader.h',
  77. 'mac/mach_o_image_symbol_table_reader.cc',
  78. 'mac/mach_o_image_symbol_table_reader.h',
  79. 'mac/memory_snapshot_mac.cc',
  80. 'mac/memory_snapshot_mac.h',
  81. 'mac/module_snapshot_mac.cc',
  82. 'mac/module_snapshot_mac.h',
  83. 'mac/process_reader.cc',
  84. 'mac/process_reader.h',
  85. 'mac/process_snapshot_mac.cc',
  86. 'mac/process_snapshot_mac.h',
  87. 'mac/process_types.cc',
  88. 'mac/process_types.h',
  89. 'mac/process_types/all.proctype',
  90. 'mac/process_types/annotation.proctype',
  91. 'mac/process_types/crashpad_info.proctype',
  92. 'mac/process_types/crashreporterclient.proctype',
  93. 'mac/process_types/custom.cc',
  94. 'mac/process_types/dyld_images.proctype',
  95. 'mac/process_types/flavors.h',
  96. 'mac/process_types/internal.h',
  97. 'mac/process_types/loader.proctype',
  98. 'mac/process_types/nlist.proctype',
  99. 'mac/process_types/traits.h',
  100. 'mac/system_snapshot_mac.cc',
  101. 'mac/system_snapshot_mac.h',
  102. 'mac/thread_snapshot_mac.cc',
  103. 'mac/thread_snapshot_mac.h',
  104. 'memory_snapshot.h',
  105. 'minidump/minidump_annotation_reader.cc',
  106. 'minidump/minidump_annotation_reader.h',
  107. 'minidump/minidump_simple_string_dictionary_reader.cc',
  108. 'minidump/minidump_simple_string_dictionary_reader.h',
  109. 'minidump/minidump_string_list_reader.cc',
  110. 'minidump/minidump_string_list_reader.h',
  111. 'minidump/minidump_string_reader.cc',
  112. 'minidump/minidump_string_reader.h',
  113. 'minidump/module_snapshot_minidump.cc',
  114. 'minidump/module_snapshot_minidump.h',
  115. 'minidump/process_snapshot_minidump.cc',
  116. 'minidump/process_snapshot_minidump.h',
  117. 'module_snapshot.h',
  118. 'posix/timezone.cc',
  119. 'posix/timezone.h',
  120. 'process_snapshot.h',
  121. 'snapshot_constants.h',
  122. 'system_snapshot.h',
  123. 'thread_snapshot.h',
  124. 'unloaded_module_snapshot.cc',
  125. 'unloaded_module_snapshot.h',
  126. 'win/cpu_context_win.cc',
  127. 'win/cpu_context_win.h',
  128. 'win/exception_snapshot_win.cc',
  129. 'win/exception_snapshot_win.h',
  130. 'win/capture_memory_delegate_win.cc',
  131. 'win/capture_memory_delegate_win.h',
  132. 'win/memory_map_region_snapshot_win.cc',
  133. 'win/memory_map_region_snapshot_win.h',
  134. 'win/memory_snapshot_win.cc',
  135. 'win/memory_snapshot_win.h',
  136. 'win/module_snapshot_win.cc',
  137. 'win/module_snapshot_win.h',
  138. 'win/pe_image_annotations_reader.cc',
  139. 'win/pe_image_annotations_reader.h',
  140. 'win/pe_image_reader.cc',
  141. 'win/pe_image_reader.h',
  142. 'win/pe_image_resource_reader.cc',
  143. 'win/pe_image_resource_reader.h',
  144. 'win/process_reader_win.cc',
  145. 'win/process_reader_win.h',
  146. 'win/process_snapshot_win.cc',
  147. 'win/process_snapshot_win.h',
  148. 'win/process_subrange_reader.cc',
  149. 'win/process_subrange_reader.h',
  150. 'win/system_snapshot_win.cc',
  151. 'win/system_snapshot_win.h',
  152. 'win/thread_snapshot_win.cc',
  153. 'win/thread_snapshot_win.h',
  154. 'x86/cpuid_reader.cc',
  155. 'x86/cpuid_reader.h',
  156. ],
  157. 'conditions': [
  158. ['OS=="win"', {
  159. 'link_settings': {
  160. 'libraries': [
  161. '-lpowrprof.lib',
  162. ],
  163. },
  164. }],
  165. ['OS=="linux" or OS=="android"', {
  166. 'sources!': [
  167. 'capture_memory.cc',
  168. 'capture_memory.h',
  169. ],
  170. }, { # else: OS!="linux" and OS!="android"
  171. 'sources/': [
  172. ['exclude', '^elf/'],
  173. ],
  174. }],
  175. ['target_arch!="ia32" and target_arch!="x64"', {
  176. 'sources/': [
  177. ['exclude', '^x86/'],
  178. ],
  179. }],
  180. ],
  181. 'target_conditions': [
  182. ['OS=="android"', {
  183. 'sources/': [
  184. ['include', '^linux/'],
  185. ],
  186. }],
  187. ],
  188. },
  189. {
  190. 'variables': {
  191. 'conditions': [
  192. ['OS == "win"', {
  193. 'snapshot_api_target_type%': 'static_library',
  194. }, {
  195. # There are no source files except on Windows.
  196. 'snapshot_api_target_type%': 'none',
  197. }],
  198. ],
  199. },
  200. 'target_name': 'crashpad_snapshot_api',
  201. 'type': '<(snapshot_api_target_type)',
  202. 'dependencies': [
  203. 'crashpad_snapshot',
  204. '../compat/compat.gyp:crashpad_compat',
  205. '../third_party/mini_chromium/mini_chromium.gyp:base',
  206. '../util/util.gyp:crashpad_util',
  207. ],
  208. 'include_dirs': [
  209. '..',
  210. ],
  211. 'sources': [
  212. 'api/module_annotations_win.cc',
  213. 'api/module_annotations_win.h',
  214. ],
  215. },
  216. ],
  217. }