Bug 1073336 part 5 - Add AnimationPlayerCollection::PlayerUpdated; r=dbaron
[gecko.git] / tools / profiler / moz.build
blobf2133bcf785b3ca430f7b8740fa2bddc926605b4
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
8     FAIL_ON_WARNINGS = True
10     XPIDL_MODULE = 'profiler'
11     XPIDL_SOURCES += [
12         'nsIProfiler.idl',
13         'nsIProfileSaveEvent.idl',
14     ]
15     EXPORTS += [
16         'GeckoProfilerFunc.h',
17         'GeckoProfilerImpl.h',
18         'JSStreamWriter.h',
19         'ProfilerMarkers.h',
20         'PseudoStack.h',
21         'shared-libraries.h',
22     ]
23     EXTRA_JS_MODULES += [
24         'Profiler.jsm',
25     ]
26     UNIFIED_SOURCES += [
27         'BreakpadSampler.cpp',
28         'JSStreamWriter.cpp',
29         'nsProfiler.cpp',
30         'nsProfilerFactory.cpp',
31         'platform.cpp',
32         'ProfileEntry.cpp',
33         'ProfilerBacktrace.cpp',
34         'ProfilerIOInterposeObserver.cpp',
35         'ProfilerMarkers.cpp',
36         'SaveProfileTask.cpp',
37         'SyncProfile.cpp',
38         'TableTicker.cpp',
39         'ThreadResponsiveness.cpp',
40         'UnwinderThread2.cpp',
41     ]
43     # This file cannot be built in unified mode because of name clashes with mozglue headers on Android.
44     SOURCES += [
45         'local_debug_info_symbolizer.cc',
46     ]
48     if CONFIG['OS_TARGET'] in ('Android', 'Linux'):
49         UNIFIED_SOURCES += [
50             'AutoObjectMapper.cpp',
51             'LulCommon.cpp',
52             'LulDwarf.cpp',
53             'LulDwarfSummariser.cpp',
54             'LulElf.cpp',
55             'LulMain.cpp',
56             'LulRWLock.cpp',
57         ]
58         # These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
59         SOURCES += [
60             'platform-linux.cc',
61             'shared-libraries-linux.cc',
62         ]
63         if CONFIG['CPU_ARCH'] == 'arm':
64             UNIFIED_SOURCES += [
65                 'LulExidx.cpp',
66             ]
67             SOURCES += [
68                 'EHABIStackWalk.cpp',
69             ]
70     elif CONFIG['OS_TARGET'] == 'Darwin':
71         UNIFIED_SOURCES += [
72             'platform-macos.cc',
73             'shared-libraries-macos.cc',
74             'shim_mac_dump_syms.mm',
75         ]
76     elif CONFIG['OS_TARGET'] == 'WINNT':
77         SOURCES += [
78             'IntelPowerGadget.cpp',
79             'platform-win32.cc',
80             'shared-libraries-win32.cc',
81         ]
83     LOCAL_INCLUDES += [
84         '/docshell/base',
85         '/ipc/chromium/src',
86         '/mozglue/linker',
87         '/toolkit/crashreporter/google-breakpad/src',
88         '/xpcom/base',
89     ]
91     # We need access to Breakpad's getcontext(3) which is suitable for Android
92     if CONFIG['OS_TARGET'] == 'Android':
93         LOCAL_INCLUDES += [
94             '/toolkit/crashreporter/google-breakpad/src/common/android/include',
95         ]
97     if CONFIG['ANDROID_CPU_ARCH'] == 'armeabi':
98         DEFINES['ARCH_ARMV6'] = True
100     if CONFIG['ENABLE_TESTS']:
101         DIRS += ['tests/gtest']
103     if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] <= '17':
104         DEFINES['ELFSIZE'] = 32
106     FINAL_LIBRARY = 'xul'
108 EXPORTS += [
109     'GeckoProfiler.h',
112 if CONFIG['MOZ_TASK_TRACER']:
113     EXPORTS += [
114         'GeckoTaskTracer.h',
115         'GeckoTaskTracerImpl.h',
116         'TracedTaskCommon.h',
117     ]
118     UNIFIED_SOURCES += [
119         'GeckoTaskTracer.cpp',
120         'TracedTaskCommon.cpp',
121     ]
123 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']