From 39b2ef6f6c104bd16635ce9098e00c697626211e Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 12 Aug 2014 21:31:35 +0000 Subject: Make GN run when doing 32-bit cross-compiles on Linux. Previously, the breakpad client target wasn't getting compiled. R=jamesr@chromium.org Review URL: https://codereview.chromium.org/462813005 Cr-Commit-Position: refs/heads/master@{#289063} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289063 0039d316-1c4b-4281-b951-d872f2087c98 --- breakpad/BUILD.gn | 113 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 55 deletions(-) (limited to 'breakpad/BUILD.gn') diff --git a/breakpad/BUILD.gn b/breakpad/BUILD.gn index 6b1e779..9747212 100644 --- a/breakpad/BUILD.gn +++ b/breakpad/BUILD.gn @@ -324,61 +324,64 @@ if (is_linux || is_android) { } } -if (is_linux && current_toolchain == host_toolchain) { - executable("dump_syms") { - sources = [ - "src/common/dwarf/bytereader.cc", - "src/common/dwarf_cfi_to_module.cc", - "src/common/dwarf_cfi_to_module.h", - "src/common/dwarf_cu_to_module.cc", - "src/common/dwarf_cu_to_module.h", - "src/common/dwarf/dwarf2diehandler.cc", - "src/common/dwarf/dwarf2reader.cc", - "src/common/dwarf_line_to_module.cc", - "src/common/dwarf_line_to_module.h", - "src/common/language.cc", - "src/common/language.h", - "src/common/linux/crc32.cc", - "src/common/linux/crc32.h", - "src/common/linux/dump_symbols.cc", - "src/common/linux/dump_symbols.h", - "src/common/linux/elf_symbols_to_module.cc", - "src/common/linux/elf_symbols_to_module.h", - "src/common/linux/elfutils.cc", - "src/common/linux/elfutils.h", - "src/common/linux/file_id.cc", - "src/common/linux/file_id.h", - "src/common/linux/linux_libc_support.cc", - "src/common/linux/linux_libc_support.h", - "src/common/linux/memory_mapped_file.cc", - "src/common/linux/memory_mapped_file.h", - "src/common/linux/guid_creator.h", - "src/common/module.cc", - "src/common/module.h", - "src/common/stabs_reader.cc", - "src/common/stabs_reader.h", - "src/common/stabs_to_module.cc", - "src/common/stabs_to_module.h", - "src/tools/linux/dump_syms/dump_syms.cc", - ] - - # There are some warnings in this code. - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - - # dwarf2reader.cc uses dynamic_cast. Because we don't typically - # don't support RTTI, we enable it for this single target. Since - # dump_syms doesn't share any object files with anything else, - # this doesn't end up polluting Chrome itself. - configs -= [ "//build/config/compiler:no_rtti" ] - configs += [ "//build/config/compiler:rtti" ] - - # Breakpad rev 583 introduced this flag. - # Using this define, stabs_reader.h will include a.out.h to - # build on Linux. - defines = [ "HAVE_A_OUT_H" ] - - include_dirs = [ "src" ] +if (is_linux) { + if (current_toolchain == host_toolchain) { + # dump_syms is a host tool, so only compile it for the host system. + executable("dump_syms") { + sources = [ + "src/common/dwarf/bytereader.cc", + "src/common/dwarf_cfi_to_module.cc", + "src/common/dwarf_cfi_to_module.h", + "src/common/dwarf_cu_to_module.cc", + "src/common/dwarf_cu_to_module.h", + "src/common/dwarf/dwarf2diehandler.cc", + "src/common/dwarf/dwarf2reader.cc", + "src/common/dwarf_line_to_module.cc", + "src/common/dwarf_line_to_module.h", + "src/common/language.cc", + "src/common/language.h", + "src/common/linux/crc32.cc", + "src/common/linux/crc32.h", + "src/common/linux/dump_symbols.cc", + "src/common/linux/dump_symbols.h", + "src/common/linux/elf_symbols_to_module.cc", + "src/common/linux/elf_symbols_to_module.h", + "src/common/linux/elfutils.cc", + "src/common/linux/elfutils.h", + "src/common/linux/file_id.cc", + "src/common/linux/file_id.h", + "src/common/linux/linux_libc_support.cc", + "src/common/linux/linux_libc_support.h", + "src/common/linux/memory_mapped_file.cc", + "src/common/linux/memory_mapped_file.h", + "src/common/linux/guid_creator.h", + "src/common/module.cc", + "src/common/module.h", + "src/common/stabs_reader.cc", + "src/common/stabs_reader.h", + "src/common/stabs_to_module.cc", + "src/common/stabs_to_module.h", + "src/tools/linux/dump_syms/dump_syms.cc", + ] + + # There are some warnings in this code. + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + # dwarf2reader.cc uses dynamic_cast. Because we don't typically + # don't support RTTI, we enable it for this single target. Since + # dump_syms doesn't share any object files with anything else, + # this doesn't end up polluting Chrome itself. + configs -= [ "//build/config/compiler:no_rtti" ] + configs += [ "//build/config/compiler:rtti" ] + + # Breakpad rev 583 introduced this flag. + # Using this define, stabs_reader.h will include a.out.h to + # build on Linux. + defines = [ "HAVE_A_OUT_H" ] + + include_dirs = [ "src" ] + } } static_library("client") { -- cgit v1.1