From e22512aed7617eab31936cc54d0de0ae81cf51aa Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Tue, 24 Jul 2007 18:06:08 -0700 Subject: [PATCH] bug 378463 - build time logic to extract debug symbols on OS X. r=mento --- toolkit/crashreporter/Makefile.in | 9 ++- .../google-breakpad/src/common/Makefile.in | 65 ++++++++++++++++++ .../src/common/mac/Makefile.in | 29 ++++---- .../src/tools/mac/dump_syms/Makefile.in | 68 +++++++++++++++++++ 4 files changed, 156 insertions(+), 15 deletions(-) create mode 100644 toolkit/crashreporter/google-breakpad/src/common/Makefile.in create mode 100644 toolkit/crashreporter/google-breakpad/src/tools/mac/dump_syms/Makefile.in diff --git a/toolkit/crashreporter/Makefile.in b/toolkit/crashreporter/Makefile.in index 82cda6748fe..ae4050f5cdf 100644 --- a/toolkit/crashreporter/Makefile.in +++ b/toolkit/crashreporter/Makefile.in @@ -61,9 +61,12 @@ ifeq ($(OS_ARCH),WINNT) endif ifeq ($(OS_ARCH),Darwin) - DIRS += airbag/src/common/mac \ - airbag/src/client/mac/handler \ - $(NULL) +DIRS += \ + airbag/src/common/ \ + airbag/src/common/mac \ + airbag/src/client/mac/handler \ + airbag/src/tools/mac/dump_syms \ + $(NULL) endif DIRS += client diff --git a/toolkit/crashreporter/google-breakpad/src/common/Makefile.in b/toolkit/crashreporter/google-breakpad/src/common/Makefile.in new file mode 100644 index 00000000000..c8f74195f1f --- /dev/null +++ b/toolkit/crashreporter/google-breakpad/src/common/Makefile.in @@ -0,0 +1,65 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is Mozilla Breakpad integration +# +# The Initial Developer of the Original Code is +# Ted Mielczarek +# Portions created by the Initial Developer are Copyright (C) 2007 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = breakpad_common +LIBRARY_NAME = breakpad_common_s +HOST_LIBRARY_NAME = host_breakpad_common_s + +LOCAL_INCLUDES = -I$(srcdir)/.. + +CPPSRCS = \ + string_conversion.cc \ + $(NULL) + +CSRCS = \ + convert_UTF.c \ + $(NULL) + +HOST_CPPSRCS = $(CPPSRCS) + +HOST_CSRCS = $(CSRCS) + +# need static lib +FORCE_STATIC_LIB = 1 + +include $(topsrcdir)/config/rules.mk diff --git a/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in b/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in index d01df8f766e..2976798eab5 100644 --- a/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in +++ b/toolkit/crashreporter/google-breakpad/src/common/mac/Makefile.in @@ -43,24 +43,29 @@ include $(DEPTH)/config/autoconf.mk MODULE = breakpad_mac_common LIBRARY_NAME = breakpad_mac_common_s +HOST_LIBRARY_NAME = host_breakpad_mac_common_s LOCAL_INCLUDES = -I$(srcdir)/../.. -CPPSRCS = \ - file_id.cc \ - macho_id.cc \ - macho_walker.cc \ - string_utilities.cc \ - ../string_conversion.cc \ - $(NULL) +# This is a little weird, but we're building a host and a target lib here. +# The host lib is used for dump_syms, and the target lib for the +# crash reporter client. Therefore, we don't need all the srcs in both. +CPPSRCS = \ + file_id.cc \ + macho_id.cc \ + macho_walker.cc \ + string_utilities.cc \ + $(NULL) -CMSRCS = \ - HTTPMultipartUpload.m \ - $(NULL) +CMSRCS = \ + HTTPMultipartUpload.m \ + $(NULL) -CSRCS = \ - ../convert_UTF.c +HOST_CPPSRCS = $(CPPSRCS) +HOST_CMMSRCS = \ + dump_syms.mm \ + $(NULL) # need static lib FORCE_STATIC_LIB = 1 diff --git a/toolkit/crashreporter/google-breakpad/src/tools/mac/dump_syms/Makefile.in b/toolkit/crashreporter/google-breakpad/src/tools/mac/dump_syms/Makefile.in new file mode 100644 index 00000000000..2524b23ce23 --- /dev/null +++ b/toolkit/crashreporter/google-breakpad/src/tools/mac/dump_syms/Makefile.in @@ -0,0 +1,68 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is Mozilla Breakpad integration +# +# The Initial Developer of the Original Code is +# Ted Mielczarek +# Portions created by the Initial Developer are Copyright (C) 2007 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../../../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +HOST_PROGRAM = dump_syms + +LOCAL_INCLUDES = \ + -I$(srcdir)/../../.. \ + -I$(srcdir)/../../../common/mac \ + $(NULL) + +HOST_CMSRCS = \ + dump_syms_tool.m \ + $(NULL) + +HOST_LIBS += \ + $(DEPTH)/toolkit/airbag/airbag/src/common/mac/$(LIB_PREFIX)host_breakpad_mac_common_s.$(LIB_SUFFIX) \ + $(DEPTH)/toolkit/airbag/airbag/src/common/$(LIB_PREFIX)host_breakpad_common_s.$(LIB_SUFFIX) \ + $(NULL) + +HOST_LDFLAGS += \ + -framework Foundation \ + -lcrypto \ + $(NULL) + +# force C++ linking +CPP_PROG_LINK = 1 + +include $(topsrcdir)/config/rules.mk