|
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/. |
|
6 |
|
7 XPIDL_SOURCES += [ |
|
8 'nsIConsoleListener.idl', |
|
9 'nsIConsoleMessage.idl', |
|
10 'nsIConsoleService.idl', |
|
11 'nsICycleCollectorListener.idl', |
|
12 'nsIDebug.idl', |
|
13 'nsIDebug2.idl', |
|
14 'nsIErrorService.idl', |
|
15 'nsIException.idl', |
|
16 'nsIGZFileWriter.idl', |
|
17 'nsIInterfaceRequestor.idl', |
|
18 'nsIMemory.idl', |
|
19 'nsIMemoryInfoDumper.idl', |
|
20 'nsIMemoryReporter.idl', |
|
21 'nsIMessageLoop.idl', |
|
22 'nsIMutable.idl', |
|
23 'nsIProgrammingLanguage.idl', |
|
24 'nsISecurityConsoleMessage.idl', |
|
25 'nsIStatusReporter.idl', |
|
26 'nsISupports.idl', |
|
27 'nsIUUIDGenerator.idl', |
|
28 'nsIVersionComparator.idl', |
|
29 'nsIVisualEventTracer.idl', |
|
30 'nsIWeakReference.idl', |
|
31 'nsrootidl.idl', |
|
32 ] |
|
33 |
|
34 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
35 XPIDL_SOURCES += [ |
|
36 'nsIMacUtils.idl', |
|
37 ] |
|
38 |
|
39 XPIDL_MODULE = 'xpcom_base' |
|
40 |
|
41 EXPORTS += [ |
|
42 'ErrorList.h', |
|
43 'nsAgg.h', |
|
44 'nsAutoPtr.h', |
|
45 'nsAutoRef.h', |
|
46 'nsCom.h', |
|
47 'nscore.h', |
|
48 'nsCycleCollector.h', |
|
49 'nsDebugImpl.h', |
|
50 'nsError.h', |
|
51 'nsGZFileWriter.h', |
|
52 'nsIID.h', |
|
53 'nsInterfaceRequestorAgg.h', |
|
54 'nsISizeOf.h', |
|
55 'nsISupportsBase.h', |
|
56 'nsISupportsObsolete.h', |
|
57 'nsObjCExceptions.h', |
|
58 'nsStackWalk.h', |
|
59 'nsTraceRefcnt.h', |
|
60 'nsWeakPtr.h', |
|
61 ] |
|
62 |
|
63 if CONFIG['OS_ARCH'] == 'WINNT': |
|
64 EXPORTS += [ |
|
65 'nsWindowsHelpers.h', |
|
66 ] |
|
67 if CONFIG['MOZ_DEBUG']: |
|
68 EXPORTS += ['pure.h'] |
|
69 SOURCES += ['pure_api.c'] |
|
70 |
|
71 EXPORTS.mozilla += [ |
|
72 'AvailableMemoryTracker.h', |
|
73 'ClearOnShutdown.h', |
|
74 'CycleCollectedJSRuntime.h', |
|
75 'Debug.h', |
|
76 'nsMemoryInfoDumper.h', |
|
77 'StackWalk.h', |
|
78 'StaticMutex.h', |
|
79 'StaticPtr.h', |
|
80 'SystemMemoryReporter.h', |
|
81 'VisualEventTracer.h', |
|
82 ] |
|
83 |
|
84 # nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't |
|
85 # optimized away oddly. |
|
86 SOURCES += [ |
|
87 'nsDebugImpl.cpp', |
|
88 ] |
|
89 SOURCES['nsDebugImpl.cpp'].no_pgo = True |
|
90 |
|
91 UNIFIED_SOURCES += [ |
|
92 'AvailableMemoryTracker.cpp', |
|
93 'ClearOnShutdown.cpp', |
|
94 'CycleCollectedJSRuntime.cpp', |
|
95 'Debug.cpp', |
|
96 'nsConsoleMessage.cpp', |
|
97 'nsConsoleService.cpp', |
|
98 'nsCycleCollector.cpp', |
|
99 'nsDumpUtils.cpp', |
|
100 'nsErrorService.cpp', |
|
101 'nsGZFileWriter.cpp', |
|
102 'nsInterfaceRequestorAgg.cpp', |
|
103 'nsMemoryImpl.cpp', |
|
104 'nsMemoryInfoDumper.cpp', |
|
105 'nsMemoryReporterManager.cpp', |
|
106 'nsMessageLoop.cpp', |
|
107 'nsSecurityConsoleMessage.cpp', |
|
108 'nsStatusReporterManager.cpp', |
|
109 'nsSystemInfo.cpp', |
|
110 'nsTraceRefcnt.cpp', |
|
111 'nsUUIDGenerator.cpp', |
|
112 'nsVersionComparatorImpl.cpp', |
|
113 'VisualEventTracer.cpp', |
|
114 ] |
|
115 |
|
116 # On Windows, NS_StackWalk will only work correctly if we have frame pointers available. |
|
117 # That will only be true for non-optimized builds, and for optimized builds with |
|
118 # --enable-profiling in the .mozconfig (which is turned on in Nightly by default.) |
|
119 # We exclude this file from other build configurations so that if somebody adds a |
|
120 # new usage of NS_StackWalk it will cause a link error, which is better than having |
|
121 # NS_StackWalk silently return garbage at runtime. |
|
122 if CONFIG['OS_TARGET'] != 'WINNT' or \ |
|
123 (not CONFIG['MOZ_OPTIMIZE'] or CONFIG['MOZ_PROFILING'] or CONFIG['MOZ_DEBUG']): |
|
124 UNIFIED_SOURCES += [ |
|
125 'nsStackWalk.cpp', |
|
126 ] |
|
127 |
|
128 if CONFIG['OS_ARCH'] == 'Linux': |
|
129 SOURCES += [ |
|
130 'SystemMemoryReporter.cpp', |
|
131 ] |
|
132 |
|
133 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
134 SOURCES += [ |
|
135 'nsMacUtilsImpl.cpp', |
|
136 ] |
|
137 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
|
138 SOURCES += [ |
|
139 'nsCrashOnException.cpp', |
|
140 ] |
|
141 |
|
142 UNIFIED_SOURCES += [ |
|
143 'nsErrorAssertsC.c', |
|
144 ] |
|
145 |
|
146 MSVC_ENABLE_PGO = True |
|
147 |
|
148 include('/ipc/chromium/chromium-config.mozbuild') |
|
149 |
|
150 FINAL_LIBRARY = 'xpcom_core' |
|
151 |
|
152 LOCAL_INCLUDES += [ |
|
153 '../build', |
|
154 '/xpcom/ds', |
|
155 ] |
|
156 |
|
157 if CONFIG['MOZ_OPTIMIZE']: |
|
158 DEFINES['MOZ_OPTIMIZE'] = True |
|
159 |
|
160 if CONFIG['GNU_CC'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
161 # Work around bug 986928 |
|
162 CXXFLAGS += ['-Wno-error=format'] |