michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: if CONFIG['MOZ_ENABLE_PROFILER_SPS']: michael@0: FAIL_ON_WARNINGS = True michael@0: michael@0: XPIDL_MODULE = 'profiler' michael@0: XPIDL_SOURCES += [ michael@0: 'nsIProfiler.idl', michael@0: 'nsIProfileSaveEvent.idl', michael@0: ] michael@0: EXPORTS += [ michael@0: 'GeckoProfilerFunc.h', michael@0: 'GeckoProfilerImpl.h', michael@0: 'ProfilerMarkers.h', michael@0: 'PseudoStack.h', michael@0: 'shared-libraries.h', michael@0: ] michael@0: EXTRA_JS_MODULES = [ michael@0: 'Profiler.jsm', michael@0: ] michael@0: UNIFIED_SOURCES += [ michael@0: 'BreakpadSampler.cpp', michael@0: 'JSStreamWriter.cpp', michael@0: 'nsProfiler.cpp', michael@0: 'nsProfilerFactory.cpp', michael@0: 'platform.cpp', michael@0: 'ProfileEntry.cpp', michael@0: 'ProfilerBacktrace.cpp', michael@0: 'ProfilerIOInterposeObserver.cpp', michael@0: 'ProfilerMarkers.cpp', michael@0: 'SaveProfileTask.cpp', michael@0: 'SyncProfile.cpp', michael@0: 'TableTicker.cpp', michael@0: 'UnwinderThread2.cpp', michael@0: ] michael@0: michael@0: # This file cannot be built in unified mode because of name clashes with mozglue headers on Android. michael@0: SOURCES += [ michael@0: 'local_debug_info_symbolizer.cc', michael@0: ] michael@0: michael@0: if CONFIG['OS_TARGET'] in ('Android', 'Linux'): michael@0: UNIFIED_SOURCES += [ michael@0: 'AutoObjectMapper.cpp', michael@0: 'LulCommon.cpp', michael@0: 'LulDwarf.cpp', michael@0: 'LulDwarfSummariser.cpp', michael@0: 'LulElf.cpp', michael@0: 'LulMain.cpp', michael@0: 'LulRWLock.cpp', michael@0: ] michael@0: # These files cannot be built in unified mode because of name clashes with mozglue headers on Android. michael@0: SOURCES += [ michael@0: 'platform-linux.cc', michael@0: 'shared-libraries-linux.cc', michael@0: ] michael@0: if CONFIG['CPU_ARCH'] == 'arm': michael@0: UNIFIED_SOURCES += [ michael@0: 'LulExidx.cpp', michael@0: ] michael@0: SOURCES += [ michael@0: 'EHABIStackWalk.cpp', michael@0: ] michael@0: elif CONFIG['OS_TARGET'] == 'Darwin': michael@0: UNIFIED_SOURCES += [ michael@0: 'platform-macos.cc', michael@0: 'shared-libraries-macos.cc', michael@0: 'shim_mac_dump_syms.mm', michael@0: ] michael@0: elif CONFIG['OS_TARGET'] == 'WINNT': michael@0: SOURCES += [ michael@0: 'IntelPowerGadget.cpp', michael@0: 'platform-win32.cc', michael@0: 'shared-libraries-win32.cc', michael@0: ] michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: '/ipc/chromium/src', michael@0: '/mozglue/linker', michael@0: '/toolkit/crashreporter/google-breakpad/src', michael@0: ] michael@0: michael@0: # We need access to Breakpad's getcontext(3) which is suitable for Android michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: LOCAL_INCLUDES += [ michael@0: '/toolkit/crashreporter/google-breakpad/src/common/android/include', michael@0: ] michael@0: michael@0: if CONFIG['ANDROID_CPU_ARCH'] == 'armeabi': michael@0: DEFINES['ARCH_ARMV6'] = True michael@0: michael@0: if CONFIG['ENABLE_TESTS']: michael@0: DIRS += ['tests/gtest'] michael@0: michael@0: FINAL_LIBRARY = 'xul' michael@0: michael@0: EXPORTS += [ michael@0: 'GeckoProfiler.h', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_TASK_TRACER']: michael@0: EXPORTS += [ michael@0: 'GeckoTaskTracer.h', michael@0: 'GeckoTaskTracerImpl.h', michael@0: 'TracedTaskCommon.h', michael@0: ] michael@0: UNIFIED_SOURCES += [ michael@0: 'GeckoTaskTracer.cpp', michael@0: 'TracedTaskCommon.cpp', michael@0: ] michael@0: michael@0: XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']