2
# User Mike Hommey <mh+mozilla@glandium.org>
3
# Date 1331628480 -3600
4
# Node ID 5168ba8c86f0ac4f6b4f15f981bc7ae770236bda
5
# Parent ad62dcabf6969355343034d3003546436ed0023e
6
Bug 734335 - Only build SPS on supported platforms. r=bgirard,r=khuey
8
Index: mozilla/configure.in
9
===================================================================
10
--- mozilla.orig/configure.in 2012-03-15 00:57:32.000000000 +0000
11
+++ mozilla/configure.in 2012-03-15 00:58:42.410718796 +0000
12
@@ -2124,10 +2124,33 @@
13
dnl ========================================================
15
dnl ========================================================
16
-MOZ_ARG_ENABLE_BOOL(sps,
17
-[ --enable-sps Enable sps profiling tool.],
18
- MOZ_ENABLE_PROFILER_SPS=1,
19
- MOZ_ENABLE_PROFILER_SPS= )
20
+MOZ_ENABLE_PROFILER_SPS=1
22
+case "${OS_TARGET}" in
24
+ case "${CPU_ARCH}" in
27
+ MOZ_ENABLE_PROFILER_SPS=
31
+ case "${CPU_ARCH}" in
34
+ MOZ_ENABLE_PROFILER_SPS=
39
+ MOZ_ENABLE_PROFILER_SPS=
43
+MOZ_ARG_DISABLE_BOOL(sps,
44
+[ --disable-sps Disable sps profiling tool.],
45
+ MOZ_ENABLE_PROFILER_SPS=,
46
+ MOZ_ENABLE_PROFILER_SPS=1)
47
if test -n "$MOZ_ENABLE_PROFILER_SPS"; then
48
AC_DEFINE(MOZ_ENABLE_PROFILER_SPS)
50
Index: mozilla/toolkit/library/Makefile.in
51
===================================================================
52
--- mozilla.orig/toolkit/library/Makefile.in 2012-03-14 15:24:27.000000000 +0000
53
+++ mozilla/toolkit/library/Makefile.in 2012-03-15 00:58:42.410718796 +0000
56
STATIC_LIBS += thebes gl ycbcr
58
+ifdef MOZ_ENABLE_PROFILER_SPS
59
COMPONENT_LIBS += profiler
62
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
63
COMPONENT_LIBS += widget_windows
64
Index: mozilla/toolkit/library/nsStaticXULComponents.cpp
65
===================================================================
66
--- mozilla.orig/toolkit/library/nsStaticXULComponents.cpp 2012-03-14 15:24:27.000000000 +0000
67
+++ mozilla/toolkit/library/nsStaticXULComponents.cpp 2012-03-15 00:58:42.410718796 +0000
72
+#if defined(MOZ_ENABLE_PROFILER_SPS)
73
+#define PROFILER_MODULE MODULE(nsProfilerModule)
75
+#define PROFILER_MODULE
79
MODULE(nsUConvModule) \
80
MODULE(nsI18nModule) \
82
MODULE(nsWindowDataSourceModule) \
83
MODULE(nsParserModule) \
85
- MODULE(nsProfilerModule) \
88
MODULE(nsImageLib2Module) \
90
Index: mozilla/tools/profiler/sampler.h
91
===================================================================
92
--- mozilla.orig/tools/profiler/sampler.h 2012-03-14 15:24:38.000000000 +0000
93
+++ mozilla/tools/profiler/sampler.h 2012-03-15 00:58:42.410718796 +0000
97
// Redefine the macros for platforms where SPS is supported.
98
-#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN)
99
+#ifdef MOZ_ENABLE_PROFILER_SPS
101
#include "sps_sampler.h"
1
103
Index: mozilla/tools/profiler/Makefile.in
2
104
===================================================================
3
--- mozilla.orig/tools/profiler/Makefile.in 2012-03-07 02:11:41.000000000 +0000
4
+++ mozilla/tools/profiler/Makefile.in 2012-03-08 15:33:02.506149247 +0000
9
-ifneq (,$(filter Android Linux,$(OS_TARGET)))
10
+ifeq ($(filter-out Android Linux, $(OS_TARGET)),$(filter-out arm% %86 x86_64, $(TARGET_CPU)))
12
DEFINES += -DMOZ_ENABLE_PROFILER_SPS
105
--- mozilla.orig/tools/profiler/Makefile.in 2012-03-14 15:24:38.000000000 +0000
106
+++ mozilla/tools/profiler/Makefile.in 2012-03-15 01:02:05.778715184 +0000
109
include $(DEPTH)/config/autoconf.mk
115
+ifdef MOZ_ENABLE_PROFILER_SPS
122
nsProfilerFactory.cpp \
130
ifneq (,$(filter Android Linux,$(OS_TARGET)))
132
-DEFINES += -DMOZ_ENABLE_PROFILER_SPS
135
shared-libraries-linux.cc \
140
ifeq ($(OS_TARGET),Darwin)
142
# for platform-macosx.cc is in the hg history and should be
143
# used when we can stackwalk using a thread handle.
145
-DEFINES += -DMOZ_ENABLE_PROFILER_SPS
148
shared-libraries-macos.cc \
154
ifeq ($(OS_TARGET),WINNT)
156
-DEFINES += -DMOZ_ENABLE_PROFILER_SPS
159
shared-libraries-win32.cc \
168
include $(topsrcdir)/config/rules.mk