tools/profiler/moz.build

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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         'ProfilerMarkers.h',
    19         'PseudoStack.h',
    20         'shared-libraries.h',
    21     ]
    22     EXTRA_JS_MODULES = [
    23         'Profiler.jsm',
    24     ]
    25     UNIFIED_SOURCES += [
    26         'BreakpadSampler.cpp',
    27         'JSStreamWriter.cpp',
    28         'nsProfiler.cpp',
    29         'nsProfilerFactory.cpp',
    30         'platform.cpp',
    31         'ProfileEntry.cpp',
    32         'ProfilerBacktrace.cpp',
    33         'ProfilerIOInterposeObserver.cpp',
    34         'ProfilerMarkers.cpp',
    35         'SaveProfileTask.cpp',
    36         'SyncProfile.cpp',
    37         'TableTicker.cpp',
    38         'UnwinderThread2.cpp',
    39     ]
    41     # This file cannot be built in unified mode because of name clashes with mozglue headers on Android.
    42     SOURCES += [
    43         'local_debug_info_symbolizer.cc',
    44     ]
    46     if CONFIG['OS_TARGET'] in ('Android', 'Linux'):
    47         UNIFIED_SOURCES += [
    48             'AutoObjectMapper.cpp',
    49             'LulCommon.cpp',
    50             'LulDwarf.cpp',
    51             'LulDwarfSummariser.cpp',
    52             'LulElf.cpp',
    53             'LulMain.cpp',
    54             'LulRWLock.cpp',
    55         ]
    56         # These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
    57         SOURCES += [
    58             'platform-linux.cc',
    59             'shared-libraries-linux.cc',
    60         ]
    61         if CONFIG['CPU_ARCH'] == 'arm':
    62             UNIFIED_SOURCES += [
    63                 'LulExidx.cpp',
    64             ]
    65             SOURCES += [
    66                 'EHABIStackWalk.cpp',
    67             ]
    68     elif CONFIG['OS_TARGET'] == 'Darwin':
    69         UNIFIED_SOURCES += [
    70             'platform-macos.cc',
    71             'shared-libraries-macos.cc',
    72             'shim_mac_dump_syms.mm',
    73         ]
    74     elif CONFIG['OS_TARGET'] == 'WINNT':
    75         SOURCES += [
    76             'IntelPowerGadget.cpp',
    77             'platform-win32.cc',
    78             'shared-libraries-win32.cc',
    79         ]
    81     LOCAL_INCLUDES += [
    82         '/ipc/chromium/src',
    83         '/mozglue/linker',
    84         '/toolkit/crashreporter/google-breakpad/src',
    85     ]
    87     # We need access to Breakpad's getcontext(3) which is suitable for Android
    88     if CONFIG['OS_TARGET'] == 'Android':
    89         LOCAL_INCLUDES += [
    90             '/toolkit/crashreporter/google-breakpad/src/common/android/include',
    91         ]
    93     if CONFIG['ANDROID_CPU_ARCH'] == 'armeabi':
    94         DEFINES['ARCH_ARMV6'] = True
    96     if CONFIG['ENABLE_TESTS']:
    97         DIRS += ['tests/gtest']
    99     FINAL_LIBRARY = 'xul'
   101 EXPORTS += [
   102     'GeckoProfiler.h',
   103 ]
   105 if CONFIG['MOZ_TASK_TRACER']:
   106     EXPORTS += [
   107         'GeckoTaskTracer.h',
   108         'GeckoTaskTracerImpl.h',
   109         'TracedTaskCommon.h',
   110     ]
   111     UNIFIED_SOURCES += [
   112         'GeckoTaskTracer.cpp',
   113         'TracedTaskCommon.cpp',
   114     ]
   116 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']

mercurial