mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 734335 - Only build SPS on supported platforms. r=bgirard,r=khuey
This commit is contained in:
parent
22a17631ae
commit
87ca7a1e77
31
configure.in
31
configure.in
@ -1981,10 +1981,33 @@ fi
|
||||
dnl ========================================================
|
||||
dnl SPS Profiler
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(sps,
|
||||
[ --enable-sps Enable sps profiling tool.],
|
||||
MOZ_ENABLE_PROFILER_SPS=1,
|
||||
MOZ_ENABLE_PROFILER_SPS= )
|
||||
MOZ_ENABLE_PROFILER_SPS=1
|
||||
|
||||
case "${OS_TARGET}" in
|
||||
Android)
|
||||
case "${CPU_ARCH}" in
|
||||
x86 | arm) ;;
|
||||
*)
|
||||
MOZ_ENABLE_PROFILER_SPS=
|
||||
esac
|
||||
;;
|
||||
Linux)
|
||||
case "${CPU_ARCH}" in
|
||||
x86 | x86_64) ;;
|
||||
*)
|
||||
MOZ_ENABLE_PROFILER_SPS=
|
||||
esac
|
||||
;;
|
||||
WINNT|Darwin) ;;
|
||||
*)
|
||||
MOZ_ENABLE_PROFILER_SPS=
|
||||
;;
|
||||
esac
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(sps,
|
||||
[ --disable-sps Disable sps profiling tool.],
|
||||
MOZ_ENABLE_PROFILER_SPS=,
|
||||
MOZ_ENABLE_PROFILER_SPS=1)
|
||||
if test -n "$MOZ_ENABLE_PROFILER_SPS"; then
|
||||
AC_DEFINE(MOZ_ENABLE_PROFILER_SPS)
|
||||
fi
|
||||
|
@ -280,7 +280,9 @@ endif
|
||||
|
||||
STATIC_LIBS += thebes gl ycbcr
|
||||
|
||||
ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
COMPONENT_LIBS += profiler
|
||||
endif
|
||||
|
||||
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
|
||||
COMPONENT_LIBS += widget_windows
|
||||
|
@ -198,6 +198,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_ENABLE_PROFILER_SPS)
|
||||
#define PROFILER_MODULE MODULE(nsProfilerModule)
|
||||
#else
|
||||
#define PROFILER_MODULE
|
||||
#endif
|
||||
|
||||
#define XUL_MODULES \
|
||||
MODULE(nsUConvModule) \
|
||||
MODULE(nsI18nModule) \
|
||||
@ -214,7 +220,7 @@
|
||||
MODULE(nsWindowDataSourceModule) \
|
||||
MODULE(nsParserModule) \
|
||||
MODULE(nsGfxModule) \
|
||||
MODULE(nsProfilerModule) \
|
||||
PROFILER_MODULE \
|
||||
WIDGET_MODULES \
|
||||
MODULE(nsImageLib2Module) \
|
||||
ICON_MODULE \
|
||||
|
@ -44,8 +44,10 @@ VPATH = $(srcdir)
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORTS = \
|
||||
sampler.h \
|
||||
EXPORTS = sampler.h
|
||||
|
||||
ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
EXPORTS += \
|
||||
sps_sampler.h \
|
||||
thread_helper.h \
|
||||
shared-libraries.h \
|
||||
@ -65,6 +67,7 @@ IS_COMPONENT = 1
|
||||
CPPSRCS = \
|
||||
nsProfilerFactory.cpp \
|
||||
nsProfiler.cpp \
|
||||
TableTicker.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
@ -76,36 +79,26 @@ EXTRA_JS_MODULES = \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter Android Linux,$(OS_TARGET)))
|
||||
|
||||
DEFINES += -DMOZ_ENABLE_PROFILER_SPS
|
||||
|
||||
CPPSRCS += \
|
||||
shared-libraries-linux.cc \
|
||||
platform-linux.cc \
|
||||
TableTicker.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),Darwin)
|
||||
|
||||
DEFINES += -DMOZ_ENABLE_PROFILER_SPS
|
||||
|
||||
CPPSRCS += \
|
||||
shared-libraries-macos.cc \
|
||||
platform-macos.cc \
|
||||
TableTicker.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),WINNT)
|
||||
|
||||
DEFINES += -DMOZ_ENABLE_PROFILER_SPS
|
||||
|
||||
CPPSRCS += \
|
||||
shared-libraries-win32.cc \
|
||||
platform-win32.cc \
|
||||
TableTicker.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -83,7 +83,7 @@
|
||||
#define SAMPLER_H
|
||||
|
||||
// Redefine the macros for platforms where SPS is supported.
|
||||
#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN)
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
|
||||
#include "sps_sampler.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user