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

Side by Side Diff: breakpad/BUILD.gn

Issue 1318343003: Annotate GN executables and shared_libraries with sanitizer deps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « base/test/BUILD.gn ('k') | chrome/BUILD.gn » ('j') | 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("//testing/test.gni") 5 import("//testing/test.gni")
6 6
7 config("tools_config") { 7 config("tools_config") {
8 include_dirs = [ 8 include_dirs = [
9 "src", 9 "src",
10 "src/third_party", 10 "src/third_party",
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 executable("microdump_stackwalk") { 132 executable("microdump_stackwalk") {
133 sources = [ 133 sources = [
134 "src/processor/microdump.cc", 134 "src/processor/microdump.cc",
135 "src/processor/microdump_processor.cc", 135 "src/processor/microdump_processor.cc",
136 "src/processor/microdump_stackwalk.cc", 136 "src/processor/microdump_stackwalk.cc",
137 ] 137 ]
138 138
139 deps = [ 139 deps = [
140 ":stackwalk_common", 140 ":stackwalk_common",
141 "//build/config/sanitizers:deps",
141 ] 142 ]
142 143
143 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ] 144 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
144 145
145 configs -= [ "//build/config/compiler:chromium_code" ] 146 configs -= [ "//build/config/compiler:chromium_code" ]
146 configs += [ "//build/config/compiler:no_chromium_code" ] 147 configs += [ "//build/config/compiler:no_chromium_code" ]
147 configs += [ ":tools_config" ] 148 configs += [ ":tools_config" ]
148 } 149 }
149 150
150 executable("minidump_stackwalk") { 151 executable("minidump_stackwalk") {
151 sources = [ 152 sources = [
152 "src/processor/exploitability.cc", 153 "src/processor/exploitability.cc",
153 "src/processor/minidump.cc", 154 "src/processor/minidump.cc",
154 "src/processor/minidump_processor.cc", 155 "src/processor/minidump_processor.cc",
155 "src/processor/minidump_stackwalk.cc", 156 "src/processor/minidump_stackwalk.cc",
156 ] 157 ]
157 158
158 deps = [ 159 deps = [
159 ":stackwalk_common", 160 ":stackwalk_common",
161 "//build/config/sanitizers:deps",
160 ] 162 ]
161 163
162 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ] 164 defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
163 165
164 configs -= [ "//build/config/compiler:chromium_code" ] 166 configs -= [ "//build/config/compiler:chromium_code" ]
165 configs += [ "//build/config/compiler:no_chromium_code" ] 167 configs += [ "//build/config/compiler:no_chromium_code" ]
166 configs += [ ":tools_config" ] 168 configs += [ ":tools_config" ]
167 169
168 # Always want these files included regardless of platform. 170 # Always want these files included regardless of platform.
169 set_sources_assignment_filter([]) 171 set_sources_assignment_filter([])
(...skipping 21 matching lines...) Expand all
191 "src/processor/pathname_stripper.cc", 193 "src/processor/pathname_stripper.cc",
192 "src/processor/pathname_stripper.h", 194 "src/processor/pathname_stripper.h",
193 "src/processor/proc_maps_linux.cc", 195 "src/processor/proc_maps_linux.cc",
194 ] 196 ]
195 197
196 configs += [ ":tools_config" ] 198 configs += [ ":tools_config" ]
197 199
198 # There are some warnings in this code. 200 # There are some warnings in this code.
199 configs -= [ "//build/config/compiler:chromium_code" ] 201 configs -= [ "//build/config/compiler:chromium_code" ]
200 configs += [ "//build/config/compiler:no_chromium_code" ] 202 configs += [ "//build/config/compiler:no_chromium_code" ]
203
204 deps = [
205 "//build/config/sanitizers:deps",
206 ]
201 } 207 }
202 } 208 }
203 209
204 # Mac -------------------------------------------------------------------------- 210 # Mac --------------------------------------------------------------------------
205 211
206 if (current_toolchain == host_toolchain && is_mac) { 212 if (current_toolchain == host_toolchain && is_mac) {
207 # TODO(GYP) This should be only 64-bit on Mac. From .gypi: 213 # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
208 # Like ld, dump_syms needs to operate on enough data that it may 214 # Like ld, dump_syms needs to operate on enough data that it may
209 # actually need to be able to address more than 4GB. Use x86_64. 215 # actually need to be able to address more than 4GB. Use x86_64.
210 # Don't worry! An x86_64 dump_syms is perfectly able to dump 216 # Don't worry! An x86_64 dump_syms is perfectly able to dump
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 libs = [ "Foundation.framework" ] 258 libs = [ "Foundation.framework" ]
253 259
254 if (!is_debug) { 260 if (!is_debug) {
255 # dump_syms crashes when built at -O1, -O2, and -O3. It does 261 # dump_syms crashes when built at -O1, -O2, and -O3. It does
256 # not crash at -Os. To play it safe, dump_syms is always built 262 # not crash at -Os. To play it safe, dump_syms is always built
257 # at -O0 until this can be sorted out. 263 # at -O0 until this can be sorted out.
258 # http://code.google.com/p/google-breakpad/issues/detail?id=329 264 # http://code.google.com/p/google-breakpad/issues/detail?id=329
259 configs -= [ "//build/config/compiler:optimize" ] 265 configs -= [ "//build/config/compiler:optimize" ]
260 cflags += [ "-O0" ] 266 cflags += [ "-O0" ]
261 } 267 }
268
269 deps = [
270 "//build/config/sanitizers:deps",
271 ]
262 } 272 }
263 273
264 executable("symupload") { 274 executable("symupload") {
265 sources = [ 275 sources = [
266 "src/common/mac/HTTPMultipartUpload.m", 276 "src/common/mac/HTTPMultipartUpload.m",
267 "src/tools/mac/symupload/symupload.m", 277 "src/tools/mac/symupload/symupload.m",
268 ] 278 ]
269 279
270 include_dirs = [ "src/common/mac" ] 280 include_dirs = [ "src/common/mac" ]
271 281
272 libs = [ "Foundation.framework" ] 282 libs = [ "Foundation.framework" ]
273 283
274 configs -= [ "//build/config/compiler:chromium_code" ] 284 configs -= [ "//build/config/compiler:chromium_code" ]
275 configs += [ "//build/config/compiler:no_chromium_code" ] 285 configs += [ "//build/config/compiler:no_chromium_code" ]
286
287 deps = [
288 "//build/config/sanitizers:deps",
289 ]
276 } 290 }
277 } 291 }
278 292
279 if (is_mac) { 293 if (is_mac) {
280 static_library("utilities") { 294 static_library("utilities") {
281 sources = [ 295 sources = [
282 "src/client/mac/crash_generation/ConfigFile.mm", 296 "src/client/mac/crash_generation/ConfigFile.mm",
283 "src/client/mac/handler/breakpad_nlist_64.cc", 297 "src/client/mac/handler/breakpad_nlist_64.cc",
284 "src/client/mac/handler/dynamic_images.cc", 298 "src/client/mac/handler/dynamic_images.cc",
285 "src/client/mac/handler/minidump_generator.cc", 299 "src/client/mac/handler/minidump_generator.cc",
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 "src/common/mac", 333 "src/common/mac",
320 "src", 334 "src",
321 ] 335 ]
322 libs = [ 336 libs = [
323 "CoreServices.framework", 337 "CoreServices.framework",
324 "Foundation.framework", 338 "Foundation.framework",
325 ] 339 ]
326 340
327 deps = [ 341 deps = [
328 ":utilities", 342 ":utilities",
343 "//build/config/sanitizers:deps",
329 ] 344 ]
330 } 345 }
331 346
332 # TODO(GYP) this target has some mac_bundle_resources stuff. 347 # TODO(GYP) this target has some mac_bundle_resources stuff.
333 # executable("crash_report_sender") { 348 # executable("crash_report_sender") {
334 # } 349 # }
335 group("crash_report_sender") { 350 group("crash_report_sender") {
336 } 351 }
337 352
338 config("breakpad_config") { 353 config("breakpad_config") {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 ] 391 ]
377 392
378 include_dirs = [ 393 include_dirs = [
379 "src", 394 "src",
380 "src/third_party", 395 "src/third_party",
381 ] 396 ]
382 397
383 configs += [ ":tools_config" ] 398 configs += [ ":tools_config" ]
384 399
385 libs = [ "dl" ] 400 libs = [ "dl" ]
401
402 deps = [
403 "//build/config/sanitizers:deps",
404 ]
386 } 405 }
387 } 406 }
388 407
389 if (is_linux || is_android) { 408 if (is_linux || is_android) {
390 if (current_toolchain == host_toolchain) { 409 if (current_toolchain == host_toolchain) {
391 # dump_syms is a host tool, so only compile it for the host system. 410 # dump_syms is a host tool, so only compile it for the host system.
392 executable("dump_syms") { 411 executable("dump_syms") {
393 sources = [ 412 sources = [
394 "src/common/dwarf/bytereader.cc", 413 "src/common/dwarf/bytereader.cc",
395 "src/common/dwarf/dwarf2diehandler.cc", 414 "src/common/dwarf/dwarf2diehandler.cc",
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 # this doesn't end up polluting Chrome itself. 455 # this doesn't end up polluting Chrome itself.
437 configs -= [ "//build/config/compiler:no_rtti" ] 456 configs -= [ "//build/config/compiler:no_rtti" ]
438 configs += [ "//build/config/compiler:rtti" ] 457 configs += [ "//build/config/compiler:rtti" ]
439 458
440 # Breakpad rev 583 introduced this flag. 459 # Breakpad rev 583 introduced this flag.
441 # Using this define, stabs_reader.h will include a.out.h to 460 # Using this define, stabs_reader.h will include a.out.h to
442 # build on Linux. 461 # build on Linux.
443 defines = [ "HAVE_A_OUT_H" ] 462 defines = [ "HAVE_A_OUT_H" ]
444 463
445 include_dirs = [ "src" ] 464 include_dirs = [ "src" ]
465
466 deps = [
467 "//build/config/sanitizers:deps",
468 ]
446 } 469 }
447 } 470 }
448 471
449 static_library("client") { 472 static_library("client") {
450 # Want all these sources for both Linux and Android. 473 # Want all these sources for both Linux and Android.
451 set_sources_assignment_filter([]) 474 set_sources_assignment_filter([])
452 sources = [ 475 sources = [
453 "src/client/linux/crash_generation/crash_generation_client.cc", 476 "src/client/linux/crash_generation/crash_generation_client.cc",
454 "src/client/linux/crash_generation/crash_generation_client.h", 477 "src/client/linux/crash_generation/crash_generation_client.h",
455 "src/client/linux/dump_writer_common/mapping_info.h", 478 "src/client/linux/dump_writer_common/mapping_info.h",
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 644 }
622 } 645 }
623 646
624 executable("linux_dumper_unittest_helper") { 647 executable("linux_dumper_unittest_helper") {
625 testonly = true 648 testonly = true
626 sources = [ 649 sources = [
627 "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc", 650 "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc",
628 ] 651 ]
629 deps = [ 652 deps = [
630 ":processor_support", 653 ":processor_support",
654 "//build/config/sanitizers:deps",
631 ] 655 ]
632 656
633 include_dirs = [ "src" ] 657 include_dirs = [ "src" ]
634 658
635 if (current_cpu == "mipsel" && is_android) { 659 if (current_cpu == "mipsel" && is_android) {
636 include_dirs += [ "src/common/android/include" ] 660 include_dirs += [ "src/common/android/include" ]
637 } 661 }
638 } 662 }
639 663
640 executable("generate_test_dump") { 664 executable("generate_test_dump") {
641 testonly = true 665 testonly = true
642 sources = [ 666 sources = [
643 "linux/generate-test-dump.cc", 667 "linux/generate-test-dump.cc",
644 ] 668 ]
645 669
646 # This file has an unused variable warning. 670 # This file has an unused variable warning.
647 configs -= [ "//build/config/compiler:chromium_code" ] 671 configs -= [ "//build/config/compiler:chromium_code" ]
648 configs += [ "//build/config/compiler:no_chromium_code" ] 672 configs += [ "//build/config/compiler:no_chromium_code" ]
649 673
650 deps = [ 674 deps = [
651 ":client", 675 ":client",
676 "//build/config/sanitizers:deps",
652 ] 677 ]
653 678
654 include_dirs = [ "src" ] 679 include_dirs = [ "src" ]
655 680
656 if (is_android) { 681 if (is_android) {
657 libs = [ "log" ] 682 libs = [ "log" ]
658 include_dirs += [ "src/common/android/include" ] 683 include_dirs += [ "src/common/android/include" ]
659 } 684 }
660 } 685 }
661 686
662 executable("minidump-2-core") { 687 executable("minidump-2-core") {
663 sources = [ 688 sources = [
664 "src/tools/linux/md2core/minidump-2-core.cc", 689 "src/tools/linux/md2core/minidump-2-core.cc",
665 ] 690 ]
666 691
667 include_dirs = [ "src" ] 692 include_dirs = [ "src" ]
668 693
669 deps = [ 694 deps = [
670 ":client", 695 ":client",
696 "//build/config/sanitizers:deps",
671 ] 697 ]
672 } 698 }
673 699
674 executable("core-2-minidump") { 700 executable("core-2-minidump") {
675 sources = [ 701 sources = [
676 "src/tools/linux/core2md/core2md.cc", 702 "src/tools/linux/core2md/core2md.cc",
677 ] 703 ]
678 704
679 deps = [ 705 deps = [
680 ":client", 706 ":client",
707 "//build/config/sanitizers:deps",
681 ] 708 ]
682 709
683 include_dirs = [ "src" ] 710 include_dirs = [ "src" ]
684 } 711 }
685 } 712 }
686 713
687 if (is_ios) { 714 if (is_ios) {
688 static_library("client") { 715 static_library("client") {
689 sources = [ 716 sources = [
690 "src/client/ios/Breakpad.h", 717 "src/client/ios/Breakpad.h",
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 sources = [ 811 sources = [
785 "src/client/windows/sender/crash_report_sender.cc", 812 "src/client/windows/sender/crash_report_sender.cc",
786 "src/client/windows/sender/crash_report_sender.h", 813 "src/client/windows/sender/crash_report_sender.h",
787 "src/common/windows/http_upload.cc", 814 "src/common/windows/http_upload.cc",
788 "src/common/windows/http_upload.h", 815 "src/common/windows/http_upload.h",
789 ] 816 ]
790 configs += [ ":sender_config" ] 817 configs += [ ":sender_config" ]
791 public_configs = [ ":sender_config" ] 818 public_configs = [ ":sender_config" ]
792 } 819 }
793 } 820 }
OLDNEW
« no previous file with comments | « base/test/BUILD.gn ('k') | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698