Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1486)

Side by Side Diff: breakpad/BUILD.gn

Issue 1822743002: Add host symlinks for microdump_stackwalk, minidump_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/symlink.gni") 5 import("//build/symlink.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 7
8 if (is_android) { 8 if (is_android) {
9 import("//build/config/android/rules.gni") 9 import("//build/config/android/rules.gni")
10 } 10 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 config("handler_config") { 44 config("handler_config") {
45 include_dirs = [ "src" ] 45 include_dirs = [ "src" ]
46 } 46 }
47 47
48 config("sender_config") { 48 config("sender_config") {
49 include_dirs = [ "src" ] 49 include_dirs = [ "src" ]
50 } 50 }
51 51
52 # {micro,mini}dump_stackwalk and minidump_dump are tool-type executables 52 # {micro,mini}dump_stackwalk and minidump_dump are tool-type executables
53 # that do not build on Windows. 53 # that do not build on Windows.
54 if (!is_win && current_toolchain == host_toolchain) { 54 if (!is_win) {
55 # Contains the code shared by both {micro,mini}dump_stackwalk. 55 if (current_toolchain == host_toolchain) {
56 static_library("stackwalk_common") { 56 # Contains the code shared by both {micro,mini}dump_stackwalk.
57 # Always want these files included regardless of platform. 57 static_library("stackwalk_common") {
58 set_sources_assignment_filter([]) 58 # Always want these files included regardless of platform.
59 sources = [ 59 set_sources_assignment_filter([])
60 "src/processor/basic_code_module.h", 60 sources = [
61 "src/processor/basic_code_modules.cc", 61 "src/processor/basic_code_module.h",
62 "src/processor/basic_code_modules.h", 62 "src/processor/basic_code_modules.cc",
63 "src/processor/basic_source_line_resolver.cc", 63 "src/processor/basic_code_modules.h",
64 "src/processor/call_stack.cc", 64 "src/processor/basic_source_line_resolver.cc",
65 "src/processor/cfi_frame_info.cc", 65 "src/processor/call_stack.cc",
66 "src/processor/cfi_frame_info.h", 66 "src/processor/cfi_frame_info.cc",
67 "src/processor/disassembler_x86.cc", 67 "src/processor/cfi_frame_info.h",
68 "src/processor/disassembler_x86.h", 68 "src/processor/disassembler_x86.cc",
69 "src/processor/dump_context.cc", 69 "src/processor/disassembler_x86.h",
70 "src/processor/dump_object.cc", 70 "src/processor/dump_context.cc",
71 "src/processor/logging.cc", 71 "src/processor/dump_object.cc",
72 "src/processor/logging.h", 72 "src/processor/logging.cc",
73 "src/processor/pathname_stripper.cc", 73 "src/processor/logging.h",
74 "src/processor/pathname_stripper.h", 74 "src/processor/pathname_stripper.cc",
75 "src/processor/proc_maps_linux.cc", 75 "src/processor/pathname_stripper.h",
76 "src/processor/process_state.cc", 76 "src/processor/proc_maps_linux.cc",
77 "src/processor/simple_symbol_supplier.cc", 77 "src/processor/process_state.cc",
78 "src/processor/simple_symbol_supplier.h", 78 "src/processor/simple_symbol_supplier.cc",
79 "src/processor/source_line_resolver_base.cc", 79 "src/processor/simple_symbol_supplier.h",
80 "src/processor/stack_frame_cpu.cc", 80 "src/processor/source_line_resolver_base.cc",
81 "src/processor/stack_frame_symbolizer.cc", 81 "src/processor/stack_frame_cpu.cc",
82 "src/processor/stackwalk_common.cc", 82 "src/processor/stack_frame_symbolizer.cc",
83 "src/processor/stackwalker.cc", 83 "src/processor/stackwalk_common.cc",
84 "src/processor/stackwalker_amd64.cc", 84 "src/processor/stackwalker.cc",
85 "src/processor/stackwalker_amd64.h", 85 "src/processor/stackwalker_amd64.cc",
86 "src/processor/stackwalker_arm.cc", 86 "src/processor/stackwalker_amd64.h",
87 "src/processor/stackwalker_arm.h", 87 "src/processor/stackwalker_arm.cc",
88 "src/processor/stackwalker_arm64.cc", 88 "src/processor/stackwalker_arm.h",
89 "src/processor/stackwalker_arm64.h", 89 "src/processor/stackwalker_arm64.cc",
90 "src/processor/stackwalker_mips.cc", 90 "src/processor/stackwalker_arm64.h",
91 "src/processor/stackwalker_mips.h", 91 "src/processor/stackwalker_mips.cc",
92 "src/processor/stackwalker_ppc.cc", 92 "src/processor/stackwalker_mips.h",
93 "src/processor/stackwalker_ppc.h", 93 "src/processor/stackwalker_ppc.cc",
94 "src/processor/stackwalker_ppc64.cc", 94 "src/processor/stackwalker_ppc.h",
95 "src/processor/stackwalker_ppc64.h", 95 "src/processor/stackwalker_ppc64.cc",
96 "src/processor/stackwalker_sparc.cc", 96 "src/processor/stackwalker_ppc64.h",
97 "src/processor/stackwalker_sparc.h", 97 "src/processor/stackwalker_sparc.cc",
98 "src/processor/stackwalker_x86.cc", 98 "src/processor/stackwalker_sparc.h",
99 "src/processor/stackwalker_x86.h", 99 "src/processor/stackwalker_x86.cc",
100 "src/processor/tokenize.cc", 100 "src/processor/stackwalker_x86.h",
101 "src/processor/tokenize.h", 101 "src/processor/tokenize.cc",
102 102 "src/processor/tokenize.h",
103 # libdisasm 103
104 "src/third_party/libdisasm/ia32_implicit.c", 104 # libdisasm
105 "src/third_party/libdisasm/ia32_implicit.h", 105 "src/third_party/libdisasm/ia32_implicit.c",
106 "src/third_party/libdisasm/ia32_insn.c", 106 "src/third_party/libdisasm/ia32_implicit.h",
107 "src/third_party/libdisasm/ia32_insn.h", 107 "src/third_party/libdisasm/ia32_insn.c",
108 "src/third_party/libdisasm/ia32_invariant.c", 108 "src/third_party/libdisasm/ia32_insn.h",
109 "src/third_party/libdisasm/ia32_invariant.h", 109 "src/third_party/libdisasm/ia32_invariant.c",
110 "src/third_party/libdisasm/ia32_modrm.c", 110 "src/third_party/libdisasm/ia32_invariant.h",
111 "src/third_party/libdisasm/ia32_modrm.h", 111 "src/third_party/libdisasm/ia32_modrm.c",
112 "src/third_party/libdisasm/ia32_opcode_tables.c", 112 "src/third_party/libdisasm/ia32_modrm.h",
113 "src/third_party/libdisasm/ia32_opcode_tables.h", 113 "src/third_party/libdisasm/ia32_opcode_tables.c",
114 "src/third_party/libdisasm/ia32_operand.c", 114 "src/third_party/libdisasm/ia32_opcode_tables.h",
115 "src/third_party/libdisasm/ia32_operand.h", 115 "src/third_party/libdisasm/ia32_operand.c",
116 "src/third_party/libdisasm/ia32_reg.c", 116 "src/third_party/libdisasm/ia32_operand.h",
117 "src/third_party/libdisasm/ia32_reg.h", 117 "src/third_party/libdisasm/ia32_reg.c",
118 "src/third_party/libdisasm/ia32_settings.c", 118 "src/third_party/libdisasm/ia32_reg.h",
119 "src/third_party/libdisasm/ia32_settings.h", 119 "src/third_party/libdisasm/ia32_settings.c",
120 "src/third_party/libdisasm/libdis.h", 120 "src/third_party/libdisasm/ia32_settings.h",
121 "src/third_party/libdisasm/qword.h", 121 "src/third_party/libdisasm/libdis.h",
122 "src/third_party/libdisasm/x86_disasm.c", 122 "src/third_party/libdisasm/qword.h",
123 "src/third_party/libdisasm/x86_format.c", 123 "src/third_party/libdisasm/x86_disasm.c",
124 "src/third_party/libdisasm/x86_imm.c", 124 "src/third_party/libdisasm/x86_format.c",
125 "src/third_party/libdisasm/x86_imm.h", 125 "src/third_party/libdisasm/x86_imm.c",
126 "src/third_party/libdisasm/x86_insn.c", 126 "src/third_party/libdisasm/x86_imm.h",
127 "src/third_party/libdisasm/x86_misc.c", 127 "src/third_party/libdisasm/x86_insn.c",
128 "src/third_party/libdisasm/x86_operand_list.c", 128 "src/third_party/libdisasm/x86_misc.c",
129 "src/third_party/libdisasm/x86_operand_list.h", 129 "src/third_party/libdisasm/x86_operand_list.c",
130 ] 130 "src/third_party/libdisasm/x86_operand_list.h",
131 131 ]
132 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ] 132
133 133 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
134 configs -= [ "//build/config/compiler:chromium_code" ] 134
135 configs += [ "//build/config/compiler:no_chromium_code" ] 135 configs -= [ "//build/config/compiler:chromium_code" ]
136 configs += [ ":tools_config" ] 136 configs += [ "//build/config/compiler:no_chromium_code" ]
137 } 137 configs += [ ":tools_config" ]
138 138 }
139 executable("microdump_stackwalk") { 139
140 sources = [ 140 executable("microdump_stackwalk") {
141 "src/processor/microdump.cc", 141 sources = [
142 "src/processor/microdump_processor.cc", 142 "src/processor/microdump.cc",
143 "src/processor/microdump_stackwalk.cc", 143 "src/processor/microdump_processor.cc",
144 ] 144 "src/processor/microdump_stackwalk.cc",
145 145 ]
146 deps = [ 146
147 ":stackwalk_common", 147 deps = [
148 "//build/config/sanitizers:deps", 148 ":stackwalk_common",
149 ] 149 "//build/config/sanitizers:deps",
150 150 ]
151 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ] 151
152 152 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
153 configs -= [ "//build/config/compiler:chromium_code" ] 153
154 configs += [ "//build/config/compiler:no_chromium_code" ] 154 configs -= [ "//build/config/compiler:chromium_code" ]
155 configs += [ ":tools_config" ] 155 configs += [ "//build/config/compiler:no_chromium_code" ]
156 } 156 configs += [ ":tools_config" ]
157 157 }
158 executable("minidump_stackwalk") { 158
159 sources = [ 159 executable("minidump_stackwalk") {
160 "src/processor/exploitability.cc", 160 sources = [
161 "src/processor/minidump.cc", 161 "src/processor/exploitability.cc",
162 "src/processor/minidump_processor.cc", 162 "src/processor/minidump.cc",
163 "src/processor/minidump_stackwalk.cc", 163 "src/processor/minidump_processor.cc",
164 ] 164 "src/processor/minidump_stackwalk.cc",
165 165 ]
166 deps = [ 166
167 ":stackwalk_common", 167 deps = [
168 "//build/config/sanitizers:deps", 168 ":stackwalk_common",
169 ] 169 "//build/config/sanitizers:deps",
170 170 ]
171 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ] 171
172 172 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
173 configs -= [ "//build/config/compiler:chromium_code" ] 173
174 configs += [ "//build/config/compiler:no_chromium_code" ] 174 configs -= [ "//build/config/compiler:chromium_code" ]
175 configs += [ ":tools_config" ] 175 configs += [ "//build/config/compiler:no_chromium_code" ]
176 176 configs += [ ":tools_config" ]
177 # Always want these files included regardless of platform. 177
178 set_sources_assignment_filter([]) 178 # Always want these files included regardless of platform.
179 sources += [ 179 set_sources_assignment_filter([])
180 "src/processor/exploitability_linux.cc", 180 sources += [
181 "src/processor/exploitability_linux.h", 181 "src/processor/exploitability_linux.cc",
182 "src/processor/exploitability_win.cc", 182 "src/processor/exploitability_linux.h",
183 "src/processor/exploitability_win.h", 183 "src/processor/exploitability_win.cc",
184 "src/processor/symbolic_constants_win.cc", 184 "src/processor/exploitability_win.h",
185 "src/processor/symbolic_constants_win.h", 185 "src/processor/symbolic_constants_win.cc",
186 ] 186 "src/processor/symbolic_constants_win.h",
187 } 187 ]
188 188 }
189 executable("minidump_dump") { 189
190 set_sources_assignment_filter([]) 190 executable("minidump_dump") {
191 sources = [ 191 set_sources_assignment_filter([])
192 "src/processor/basic_code_module.h", 192 sources = [
193 "src/processor/basic_code_modules.cc", 193 "src/processor/basic_code_module.h",
194 "src/processor/basic_code_modules.h", 194 "src/processor/basic_code_modules.cc",
195 "src/processor/dump_context.cc", 195 "src/processor/basic_code_modules.h",
196 "src/processor/dump_object.cc", 196 "src/processor/dump_context.cc",
197 "src/processor/logging.cc", 197 "src/processor/dump_object.cc",
198 "src/processor/logging.h", 198 "src/processor/logging.cc",
199 "src/processor/minidump.cc", 199 "src/processor/logging.h",
200 "src/processor/minidump_dump.cc", 200 "src/processor/minidump.cc",
201 "src/processor/pathname_stripper.cc", 201 "src/processor/minidump_dump.cc",
202 "src/processor/pathname_stripper.h", 202 "src/processor/pathname_stripper.cc",
203 "src/processor/proc_maps_linux.cc", 203 "src/processor/pathname_stripper.h",
204 ] 204 "src/processor/proc_maps_linux.cc",
205 205 ]
206 configs += [ ":tools_config" ] 206
207 207 configs += [ ":tools_config" ]
208 # There are some warnings in this code. 208
209 configs -= [ "//build/config/compiler:chromium_code" ] 209 # There are some warnings in this code.
210 configs += [ "//build/config/compiler:no_chromium_code" ] 210 configs -= [ "//build/config/compiler:chromium_code" ]
211 211 configs += [ "//build/config/compiler:no_chromium_code" ]
212 deps = [ 212
213 "//build/config/sanitizers:deps", 213 deps = [
214 ] 214 "//build/config/sanitizers:deps",
215 ]
216 }
217 } else {
218 # Aliases for convenience.
219 binary_symlink("microdump_stackwalk") {
220 binary_label = ":dump_syms($host_toolchain)"
221 }
222 binary_symlink("minidump_stackwalk") {
223 binary_label = ":dump_syms($host_toolchain)"
224 }
225 binary_symlink("minidump_dump") {
226 binary_label = ":$target_name($host_toolchain)"
227 }
215 } 228 }
216 } 229 }
217 230
218 # Mac -------------------------------------------------------------------------- 231 # Mac --------------------------------------------------------------------------
219 232
220 if (current_toolchain == host_toolchain && is_mac) { 233 if (is_mac) {
221 # TODO(GYP) This should be only 64-bit on Mac. From .gypi: 234 if (current_toolchain == host_toolchain) {
222 # Like ld, dump_syms needs to operate on enough data that it may 235 # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
223 # actually need to be able to address more than 4GB. Use x86_64. 236 # Like ld, dump_syms needs to operate on enough data that it may
224 # Don't worry! An x86_64 dump_syms is perfectly able to dump 237 # actually need to be able to address more than 4GB. Use x86_64.
225 # 32-bit files. 238 # Don't worry! An x86_64 dump_syms is perfectly able to dump
226 executable("dump_syms") { 239 # 32-bit files.
227 sources = [ 240 executable("dump_syms") {
228 "src/common/dwarf/bytereader.cc", 241 sources = [
229 "src/common/dwarf/dwarf2diehandler.cc", 242 "src/common/dwarf/bytereader.cc",
230 "src/common/dwarf/dwarf2reader.cc", 243 "src/common/dwarf/dwarf2diehandler.cc",
231 "src/common/dwarf_cfi_to_module.cc", 244 "src/common/dwarf/dwarf2reader.cc",
232 "src/common/dwarf_cu_to_module.cc", 245 "src/common/dwarf_cfi_to_module.cc",
233 "src/common/dwarf_line_to_module.cc", 246 "src/common/dwarf_cu_to_module.cc",
234 "src/common/language.cc", 247 "src/common/dwarf_line_to_module.cc",
235 "src/common/mac/arch_utilities.cc", 248 "src/common/language.cc",
236 "src/common/mac/arch_utilities.h", 249 "src/common/mac/arch_utilities.cc",
237 "src/common/mac/dump_syms.cc", 250 "src/common/mac/arch_utilities.h",
238 "src/common/mac/file_id.cc", 251 "src/common/mac/dump_syms.cc",
239 "src/common/mac/macho_id.cc", 252 "src/common/mac/file_id.cc",
240 "src/common/mac/macho_reader.cc", 253 "src/common/mac/macho_id.cc",
241 "src/common/mac/macho_utilities.cc", 254 "src/common/mac/macho_reader.cc",
242 "src/common/mac/macho_walker.cc", 255 "src/common/mac/macho_utilities.cc",
243 "src/common/md5.cc", 256 "src/common/mac/macho_walker.cc",
244 "src/common/module.cc", 257 "src/common/md5.cc",
245 "src/common/stabs_reader.cc", 258 "src/common/module.cc",
246 "src/common/stabs_to_module.cc", 259 "src/common/stabs_reader.cc",
247 "src/tools/mac/dump_syms/dump_syms_tool.cc", 260 "src/common/stabs_to_module.cc",
248 ] 261 "src/tools/mac/dump_syms/dump_syms_tool.cc",
249 262 ]
250 # For src/common/stabs_reader.h. 263
251 defines = [ "HAVE_MACH_O_NLIST_H" ] 264 # For src/common/stabs_reader.h.
252 include_dirs = [ "src/common/mac" ] 265 defines = [ "HAVE_MACH_O_NLIST_H" ]
253 266 include_dirs = [ "src/common/mac" ]
254 # The DWARF utilities require -funsigned-char. 267
255 cflags = [ "-funsigned-char" ] 268 # The DWARF utilities require -funsigned-char.
256 269 cflags = [ "-funsigned-char" ]
257 configs += [ ":internal_config" ] 270
258 271 configs += [ ":internal_config" ]
259 configs -= [ "//build/config/compiler:chromium_code" ] 272
260 configs += [ "//build/config/compiler:no_chromium_code" ] 273 configs -= [ "//build/config/compiler:chromium_code" ]
261 274 configs += [ "//build/config/compiler:no_chromium_code" ]
262 # dwarf2reader.cc uses dynamic_cast. 275
263 configs -= [ "//build/config/compiler:no_rtti" ] 276 # dwarf2reader.cc uses dynamic_cast.
264 configs += [ "//build/config/compiler:rtti" ] 277 configs -= [ "//build/config/compiler:no_rtti" ]
265 278 configs += [ "//build/config/compiler:rtti" ]
266 libs = [ "Foundation.framework" ] 279
267 280 libs = [ "Foundation.framework" ]
268 if (!is_debug) { 281
269 # dump_syms crashes when built at -O1, -O2, and -O3. It does 282 if (!is_debug) {
270 # not crash at -Os. To play it safe, dump_syms is always built 283 # dump_syms crashes when built at -O1, -O2, and -O3. It does
271 # at -O0 until this can be sorted out. 284 # not crash at -Os. To play it safe, dump_syms is always built
272 # http://code.google.com/p/google-breakpad/issues/detail?id=329 285 # at -O0 until this can be sorted out.
273 configs -= [ "//build/config/compiler:default_optimization" ] 286 # http://code.google.com/p/google-breakpad/issues/detail?id=329
274 cflags += [ "-O0" ] 287 configs -= [ "//build/config/compiler:default_optimization" ]
275 } 288 cflags += [ "-O0" ]
276 289 }
277 deps = [ 290
278 "//build/config/sanitizers:deps", 291 deps = [
279 ] 292 "//build/config/sanitizers:deps",
280 } 293 ]
281 294 }
282 executable("symupload") { 295
283 sources = [ 296 executable("symupload") {
284 "src/common/mac/HTTPMultipartUpload.m", 297 sources = [
285 "src/tools/mac/symupload/symupload.m", 298 "src/common/mac/HTTPMultipartUpload.m",
286 ] 299 "src/tools/mac/symupload/symupload.m",
287 300 ]
288 include_dirs = [ "src/common/mac" ] 301
289 302 include_dirs = [ "src/common/mac" ]
290 libs = [ "Foundation.framework" ] 303
291 304 libs = [ "Foundation.framework" ]
292 configs -= [ "//build/config/compiler:chromium_code" ] 305
293 configs += [ "//build/config/compiler:no_chromium_code" ] 306 configs -= [ "//build/config/compiler:chromium_code" ]
294 307 configs += [ "//build/config/compiler:no_chromium_code" ]
295 deps = [ 308
296 "//build/config/sanitizers:deps", 309 deps = [
297 ] 310 "//build/config/sanitizers:deps",
311 ]
312 }
313 } else {
314 binary_symlink("dump_syms") {
315 binary_label = ":$target_name($host_toolchain)"
316 }
317 binary_symlink("symupload") {
318 binary_label = ":$target_name($host_toolchain)"
319 }
298 } 320 }
299 } 321 }
300 322
301 if (is_mac) { 323 if (is_mac) {
302 static_library("utilities") { 324 static_library("utilities") {
303 sources = [ 325 sources = [
304 "src/client/mac/crash_generation/ConfigFile.mm", 326 "src/client/mac/crash_generation/ConfigFile.mm",
305 "src/client/mac/handler/breakpad_nlist_64.cc", 327 "src/client/mac/handler/breakpad_nlist_64.cc",
306 "src/client/mac/handler/dynamic_images.cc", 328 "src/client/mac/handler/dynamic_images.cc",
307 "src/client/mac/handler/minidump_generator.cc", 329 "src/client/mac/handler/minidump_generator.cc",
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 906
885 # TODO(GYP) Delete this after we've converted everything to GN. 907 # TODO(GYP) Delete this after we've converted everything to GN.
886 # The _run targets exist only for compatibility w/ GYP. 908 # The _run targets exist only for compatibility w/ GYP.
887 group("breakpad_unittests_apk_run") { 909 group("breakpad_unittests_apk_run") {
888 testonly = true 910 testonly = true
889 deps = [ 911 deps = [
890 ":breakpad_unittests", 912 ":breakpad_unittests",
891 ] 913 ]
892 } 914 }
893 } 915 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698