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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: breakpad/BUILD.gn
diff --git a/breakpad/BUILD.gn b/breakpad/BUILD.gn
index 13fb3be3194e0fa5d499b1c04a8e87d83b3d13d5..0fd15ceb199ff2ae97e6df94f8ba5271a2c0dc95 100644
--- a/breakpad/BUILD.gn
+++ b/breakpad/BUILD.gn
@@ -51,250 +51,272 @@ config("sender_config") {
# {micro,mini}dump_stackwalk and minidump_dump are tool-type executables
# that do not build on Windows.
-if (!is_win && current_toolchain == host_toolchain) {
- # Contains the code shared by both {micro,mini}dump_stackwalk.
- static_library("stackwalk_common") {
- # Always want these files included regardless of platform.
- set_sources_assignment_filter([])
- sources = [
- "src/processor/basic_code_module.h",
- "src/processor/basic_code_modules.cc",
- "src/processor/basic_code_modules.h",
- "src/processor/basic_source_line_resolver.cc",
- "src/processor/call_stack.cc",
- "src/processor/cfi_frame_info.cc",
- "src/processor/cfi_frame_info.h",
- "src/processor/disassembler_x86.cc",
- "src/processor/disassembler_x86.h",
- "src/processor/dump_context.cc",
- "src/processor/dump_object.cc",
- "src/processor/logging.cc",
- "src/processor/logging.h",
- "src/processor/pathname_stripper.cc",
- "src/processor/pathname_stripper.h",
- "src/processor/proc_maps_linux.cc",
- "src/processor/process_state.cc",
- "src/processor/simple_symbol_supplier.cc",
- "src/processor/simple_symbol_supplier.h",
- "src/processor/source_line_resolver_base.cc",
- "src/processor/stack_frame_cpu.cc",
- "src/processor/stack_frame_symbolizer.cc",
- "src/processor/stackwalk_common.cc",
- "src/processor/stackwalker.cc",
- "src/processor/stackwalker_amd64.cc",
- "src/processor/stackwalker_amd64.h",
- "src/processor/stackwalker_arm.cc",
- "src/processor/stackwalker_arm.h",
- "src/processor/stackwalker_arm64.cc",
- "src/processor/stackwalker_arm64.h",
- "src/processor/stackwalker_mips.cc",
- "src/processor/stackwalker_mips.h",
- "src/processor/stackwalker_ppc.cc",
- "src/processor/stackwalker_ppc.h",
- "src/processor/stackwalker_ppc64.cc",
- "src/processor/stackwalker_ppc64.h",
- "src/processor/stackwalker_sparc.cc",
- "src/processor/stackwalker_sparc.h",
- "src/processor/stackwalker_x86.cc",
- "src/processor/stackwalker_x86.h",
- "src/processor/tokenize.cc",
- "src/processor/tokenize.h",
-
- # libdisasm
- "src/third_party/libdisasm/ia32_implicit.c",
- "src/third_party/libdisasm/ia32_implicit.h",
- "src/third_party/libdisasm/ia32_insn.c",
- "src/third_party/libdisasm/ia32_insn.h",
- "src/third_party/libdisasm/ia32_invariant.c",
- "src/third_party/libdisasm/ia32_invariant.h",
- "src/third_party/libdisasm/ia32_modrm.c",
- "src/third_party/libdisasm/ia32_modrm.h",
- "src/third_party/libdisasm/ia32_opcode_tables.c",
- "src/third_party/libdisasm/ia32_opcode_tables.h",
- "src/third_party/libdisasm/ia32_operand.c",
- "src/third_party/libdisasm/ia32_operand.h",
- "src/third_party/libdisasm/ia32_reg.c",
- "src/third_party/libdisasm/ia32_reg.h",
- "src/third_party/libdisasm/ia32_settings.c",
- "src/third_party/libdisasm/ia32_settings.h",
- "src/third_party/libdisasm/libdis.h",
- "src/third_party/libdisasm/qword.h",
- "src/third_party/libdisasm/x86_disasm.c",
- "src/third_party/libdisasm/x86_format.c",
- "src/third_party/libdisasm/x86_imm.c",
- "src/third_party/libdisasm/x86_imm.h",
- "src/third_party/libdisasm/x86_insn.c",
- "src/third_party/libdisasm/x86_misc.c",
- "src/third_party/libdisasm/x86_operand_list.c",
- "src/third_party/libdisasm/x86_operand_list.h",
- ]
+if (!is_win) {
+ if (current_toolchain == host_toolchain) {
+ # Contains the code shared by both {micro,mini}dump_stackwalk.
+ static_library("stackwalk_common") {
+ # Always want these files included regardless of platform.
+ set_sources_assignment_filter([])
+ sources = [
+ "src/processor/basic_code_module.h",
+ "src/processor/basic_code_modules.cc",
+ "src/processor/basic_code_modules.h",
+ "src/processor/basic_source_line_resolver.cc",
+ "src/processor/call_stack.cc",
+ "src/processor/cfi_frame_info.cc",
+ "src/processor/cfi_frame_info.h",
+ "src/processor/disassembler_x86.cc",
+ "src/processor/disassembler_x86.h",
+ "src/processor/dump_context.cc",
+ "src/processor/dump_object.cc",
+ "src/processor/logging.cc",
+ "src/processor/logging.h",
+ "src/processor/pathname_stripper.cc",
+ "src/processor/pathname_stripper.h",
+ "src/processor/proc_maps_linux.cc",
+ "src/processor/process_state.cc",
+ "src/processor/simple_symbol_supplier.cc",
+ "src/processor/simple_symbol_supplier.h",
+ "src/processor/source_line_resolver_base.cc",
+ "src/processor/stack_frame_cpu.cc",
+ "src/processor/stack_frame_symbolizer.cc",
+ "src/processor/stackwalk_common.cc",
+ "src/processor/stackwalker.cc",
+ "src/processor/stackwalker_amd64.cc",
+ "src/processor/stackwalker_amd64.h",
+ "src/processor/stackwalker_arm.cc",
+ "src/processor/stackwalker_arm.h",
+ "src/processor/stackwalker_arm64.cc",
+ "src/processor/stackwalker_arm64.h",
+ "src/processor/stackwalker_mips.cc",
+ "src/processor/stackwalker_mips.h",
+ "src/processor/stackwalker_ppc.cc",
+ "src/processor/stackwalker_ppc.h",
+ "src/processor/stackwalker_ppc64.cc",
+ "src/processor/stackwalker_ppc64.h",
+ "src/processor/stackwalker_sparc.cc",
+ "src/processor/stackwalker_sparc.h",
+ "src/processor/stackwalker_x86.cc",
+ "src/processor/stackwalker_x86.h",
+ "src/processor/tokenize.cc",
+ "src/processor/tokenize.h",
+
+ # libdisasm
+ "src/third_party/libdisasm/ia32_implicit.c",
+ "src/third_party/libdisasm/ia32_implicit.h",
+ "src/third_party/libdisasm/ia32_insn.c",
+ "src/third_party/libdisasm/ia32_insn.h",
+ "src/third_party/libdisasm/ia32_invariant.c",
+ "src/third_party/libdisasm/ia32_invariant.h",
+ "src/third_party/libdisasm/ia32_modrm.c",
+ "src/third_party/libdisasm/ia32_modrm.h",
+ "src/third_party/libdisasm/ia32_opcode_tables.c",
+ "src/third_party/libdisasm/ia32_opcode_tables.h",
+ "src/third_party/libdisasm/ia32_operand.c",
+ "src/third_party/libdisasm/ia32_operand.h",
+ "src/third_party/libdisasm/ia32_reg.c",
+ "src/third_party/libdisasm/ia32_reg.h",
+ "src/third_party/libdisasm/ia32_settings.c",
+ "src/third_party/libdisasm/ia32_settings.h",
+ "src/third_party/libdisasm/libdis.h",
+ "src/third_party/libdisasm/qword.h",
+ "src/third_party/libdisasm/x86_disasm.c",
+ "src/third_party/libdisasm/x86_format.c",
+ "src/third_party/libdisasm/x86_imm.c",
+ "src/third_party/libdisasm/x86_imm.h",
+ "src/third_party/libdisasm/x86_insn.c",
+ "src/third_party/libdisasm/x86_misc.c",
+ "src/third_party/libdisasm/x86_operand_list.c",
+ "src/third_party/libdisasm/x86_operand_list.h",
+ ]
- defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
+ defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":tools_config" ]
- }
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":tools_config" ]
+ }
- executable("microdump_stackwalk") {
- sources = [
- "src/processor/microdump.cc",
- "src/processor/microdump_processor.cc",
- "src/processor/microdump_stackwalk.cc",
- ]
+ executable("microdump_stackwalk") {
+ sources = [
+ "src/processor/microdump.cc",
+ "src/processor/microdump_processor.cc",
+ "src/processor/microdump_stackwalk.cc",
+ ]
- deps = [
- ":stackwalk_common",
- "//build/config/sanitizers:deps",
- ]
+ deps = [
+ ":stackwalk_common",
+ "//build/config/sanitizers:deps",
+ ]
- defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
+ defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":tools_config" ]
- }
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":tools_config" ]
+ }
- executable("minidump_stackwalk") {
- sources = [
- "src/processor/exploitability.cc",
- "src/processor/minidump.cc",
- "src/processor/minidump_processor.cc",
- "src/processor/minidump_stackwalk.cc",
- ]
+ executable("minidump_stackwalk") {
+ sources = [
+ "src/processor/exploitability.cc",
+ "src/processor/minidump.cc",
+ "src/processor/minidump_processor.cc",
+ "src/processor/minidump_stackwalk.cc",
+ ]
- deps = [
- ":stackwalk_common",
- "//build/config/sanitizers:deps",
- ]
+ deps = [
+ ":stackwalk_common",
+ "//build/config/sanitizers:deps",
+ ]
- defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
+ defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":tools_config" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":tools_config" ]
- # Always want these files included regardless of platform.
- set_sources_assignment_filter([])
- sources += [
- "src/processor/exploitability_linux.cc",
- "src/processor/exploitability_linux.h",
- "src/processor/exploitability_win.cc",
- "src/processor/exploitability_win.h",
- "src/processor/symbolic_constants_win.cc",
- "src/processor/symbolic_constants_win.h",
- ]
- }
+ # Always want these files included regardless of platform.
+ set_sources_assignment_filter([])
+ sources += [
+ "src/processor/exploitability_linux.cc",
+ "src/processor/exploitability_linux.h",
+ "src/processor/exploitability_win.cc",
+ "src/processor/exploitability_win.h",
+ "src/processor/symbolic_constants_win.cc",
+ "src/processor/symbolic_constants_win.h",
+ ]
+ }
- executable("minidump_dump") {
- set_sources_assignment_filter([])
- sources = [
- "src/processor/basic_code_module.h",
- "src/processor/basic_code_modules.cc",
- "src/processor/basic_code_modules.h",
- "src/processor/dump_context.cc",
- "src/processor/dump_object.cc",
- "src/processor/logging.cc",
- "src/processor/logging.h",
- "src/processor/minidump.cc",
- "src/processor/minidump_dump.cc",
- "src/processor/pathname_stripper.cc",
- "src/processor/pathname_stripper.h",
- "src/processor/proc_maps_linux.cc",
- ]
+ executable("minidump_dump") {
+ set_sources_assignment_filter([])
+ sources = [
+ "src/processor/basic_code_module.h",
+ "src/processor/basic_code_modules.cc",
+ "src/processor/basic_code_modules.h",
+ "src/processor/dump_context.cc",
+ "src/processor/dump_object.cc",
+ "src/processor/logging.cc",
+ "src/processor/logging.h",
+ "src/processor/minidump.cc",
+ "src/processor/minidump_dump.cc",
+ "src/processor/pathname_stripper.cc",
+ "src/processor/pathname_stripper.h",
+ "src/processor/proc_maps_linux.cc",
+ ]
- configs += [ ":tools_config" ]
+ configs += [ ":tools_config" ]
- # There are some warnings in this code.
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ # There are some warnings in this code.
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
- deps = [
- "//build/config/sanitizers:deps",
- ]
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
+ }
+ } else {
+ # Aliases for convenience.
+ binary_symlink("microdump_stackwalk") {
+ binary_label = ":dump_syms($host_toolchain)"
+ }
+ binary_symlink("minidump_stackwalk") {
+ binary_label = ":dump_syms($host_toolchain)"
+ }
+ binary_symlink("minidump_dump") {
+ binary_label = ":$target_name($host_toolchain)"
+ }
}
}
# Mac --------------------------------------------------------------------------
-if (current_toolchain == host_toolchain && is_mac) {
- # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
- # Like ld, dump_syms needs to operate on enough data that it may
- # actually need to be able to address more than 4GB. Use x86_64.
- # Don't worry! An x86_64 dump_syms is perfectly able to dump
- # 32-bit files.
- executable("dump_syms") {
- sources = [
- "src/common/dwarf/bytereader.cc",
- "src/common/dwarf/dwarf2diehandler.cc",
- "src/common/dwarf/dwarf2reader.cc",
- "src/common/dwarf_cfi_to_module.cc",
- "src/common/dwarf_cu_to_module.cc",
- "src/common/dwarf_line_to_module.cc",
- "src/common/language.cc",
- "src/common/mac/arch_utilities.cc",
- "src/common/mac/arch_utilities.h",
- "src/common/mac/dump_syms.cc",
- "src/common/mac/file_id.cc",
- "src/common/mac/macho_id.cc",
- "src/common/mac/macho_reader.cc",
- "src/common/mac/macho_utilities.cc",
- "src/common/mac/macho_walker.cc",
- "src/common/md5.cc",
- "src/common/module.cc",
- "src/common/stabs_reader.cc",
- "src/common/stabs_to_module.cc",
- "src/tools/mac/dump_syms/dump_syms_tool.cc",
- ]
+if (is_mac) {
+ if (current_toolchain == host_toolchain) {
+ # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
+ # Like ld, dump_syms needs to operate on enough data that it may
+ # actually need to be able to address more than 4GB. Use x86_64.
+ # Don't worry! An x86_64 dump_syms is perfectly able to dump
+ # 32-bit files.
+ executable("dump_syms") {
+ sources = [
+ "src/common/dwarf/bytereader.cc",
+ "src/common/dwarf/dwarf2diehandler.cc",
+ "src/common/dwarf/dwarf2reader.cc",
+ "src/common/dwarf_cfi_to_module.cc",
+ "src/common/dwarf_cu_to_module.cc",
+ "src/common/dwarf_line_to_module.cc",
+ "src/common/language.cc",
+ "src/common/mac/arch_utilities.cc",
+ "src/common/mac/arch_utilities.h",
+ "src/common/mac/dump_syms.cc",
+ "src/common/mac/file_id.cc",
+ "src/common/mac/macho_id.cc",
+ "src/common/mac/macho_reader.cc",
+ "src/common/mac/macho_utilities.cc",
+ "src/common/mac/macho_walker.cc",
+ "src/common/md5.cc",
+ "src/common/module.cc",
+ "src/common/stabs_reader.cc",
+ "src/common/stabs_to_module.cc",
+ "src/tools/mac/dump_syms/dump_syms_tool.cc",
+ ]
- # For src/common/stabs_reader.h.
- defines = [ "HAVE_MACH_O_NLIST_H" ]
- include_dirs = [ "src/common/mac" ]
+ # For src/common/stabs_reader.h.
+ defines = [ "HAVE_MACH_O_NLIST_H" ]
+ include_dirs = [ "src/common/mac" ]
- # The DWARF utilities require -funsigned-char.
- cflags = [ "-funsigned-char" ]
+ # The DWARF utilities require -funsigned-char.
+ cflags = [ "-funsigned-char" ]
- configs += [ ":internal_config" ]
+ configs += [ ":internal_config" ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
- # dwarf2reader.cc uses dynamic_cast.
- configs -= [ "//build/config/compiler:no_rtti" ]
- configs += [ "//build/config/compiler:rtti" ]
+ # dwarf2reader.cc uses dynamic_cast.
+ configs -= [ "//build/config/compiler:no_rtti" ]
+ configs += [ "//build/config/compiler:rtti" ]
- libs = [ "Foundation.framework" ]
+ libs = [ "Foundation.framework" ]
- if (!is_debug) {
- # dump_syms crashes when built at -O1, -O2, and -O3. It does
- # not crash at -Os. To play it safe, dump_syms is always built
- # at -O0 until this can be sorted out.
- # http://code.google.com/p/google-breakpad/issues/detail?id=329
- configs -= [ "//build/config/compiler:default_optimization" ]
- cflags += [ "-O0" ]
- }
+ if (!is_debug) {
+ # dump_syms crashes when built at -O1, -O2, and -O3. It does
+ # not crash at -Os. To play it safe, dump_syms is always built
+ # at -O0 until this can be sorted out.
+ # http://code.google.com/p/google-breakpad/issues/detail?id=329
+ configs -= [ "//build/config/compiler:default_optimization" ]
+ cflags += [ "-O0" ]
+ }
- deps = [
- "//build/config/sanitizers:deps",
- ]
- }
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
+ }
- executable("symupload") {
- sources = [
- "src/common/mac/HTTPMultipartUpload.m",
- "src/tools/mac/symupload/symupload.m",
- ]
+ executable("symupload") {
+ sources = [
+ "src/common/mac/HTTPMultipartUpload.m",
+ "src/tools/mac/symupload/symupload.m",
+ ]
- include_dirs = [ "src/common/mac" ]
+ include_dirs = [ "src/common/mac" ]
- libs = [ "Foundation.framework" ]
+ libs = [ "Foundation.framework" ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
- deps = [
- "//build/config/sanitizers:deps",
- ]
+ deps = [
+ "//build/config/sanitizers:deps",
+ ]
+ }
+ } else {
+ binary_symlink("dump_syms") {
+ binary_label = ":$target_name($host_toolchain)"
+ }
+ binary_symlink("symupload") {
+ binary_label = ":$target_name($host_toolchain)"
+ }
}
}
« 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