Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
michael@0 | 2 | # vim: set filetype=python: |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | EXPORTS += [ |
michael@0 | 8 | 'DrawMode.h', |
michael@0 | 9 | 'gfx2DGlue.h', |
michael@0 | 10 | 'gfx3DMatrix.h', |
michael@0 | 11 | 'gfxAlphaRecovery.h', |
michael@0 | 12 | 'gfxASurface.h', |
michael@0 | 13 | 'gfxBaseSharedMemorySurface.h', |
michael@0 | 14 | 'gfxBlur.h', |
michael@0 | 15 | 'gfxCachedTempSurface.h', |
michael@0 | 16 | 'gfxColor.h', |
michael@0 | 17 | 'gfxContext.h', |
michael@0 | 18 | 'gfxDrawable.h', |
michael@0 | 19 | 'gfxFailure.h', |
michael@0 | 20 | 'gfxFont.h', |
michael@0 | 21 | 'gfxFontConstants.h', |
michael@0 | 22 | 'gfxFontFeatures.h', |
michael@0 | 23 | 'gfxFontInfoLoader.h', |
michael@0 | 24 | 'gfxFontTest.h', |
michael@0 | 25 | 'gfxFontUtils.h', |
michael@0 | 26 | 'gfxGradientCache.h', |
michael@0 | 27 | 'gfxImageSurface.h', |
michael@0 | 28 | 'gfxLineSegment.h', |
michael@0 | 29 | 'gfxMathTable.h', |
michael@0 | 30 | 'gfxMatrix.h', |
michael@0 | 31 | 'gfxPath.h', |
michael@0 | 32 | 'gfxPattern.h', |
michael@0 | 33 | 'gfxPlatform.h', |
michael@0 | 34 | 'gfxPoint.h', |
michael@0 | 35 | 'gfxPoint3D.h', |
michael@0 | 36 | 'gfxPointH3D.h', |
michael@0 | 37 | 'gfxPrefs.h', |
michael@0 | 38 | 'gfxQuad.h', |
michael@0 | 39 | 'gfxQuaternion.h', |
michael@0 | 40 | 'gfxRect.h', |
michael@0 | 41 | 'gfxReusableImageSurfaceWrapper.h', |
michael@0 | 42 | 'gfxReusableSharedImageSurfaceWrapper.h', |
michael@0 | 43 | 'gfxReusableSurfaceWrapper.h', |
michael@0 | 44 | 'gfxSharedImageSurface.h', |
michael@0 | 45 | 'gfxSharedQuartzSurface.h', |
michael@0 | 46 | 'gfxSkipChars.h', |
michael@0 | 47 | 'gfxSVGGlyphs.h', |
michael@0 | 48 | 'gfxTeeSurface.h', |
michael@0 | 49 | 'gfxTypes.h', |
michael@0 | 50 | 'gfxUserFontSet.h', |
michael@0 | 51 | 'gfxUtils.h', |
michael@0 | 52 | 'GraphicsFilter.h', |
michael@0 | 53 | 'nsSurfaceTexture.h', |
michael@0 | 54 | 'RoundedRect.h', |
michael@0 | 55 | ] |
michael@0 | 56 | |
michael@0 | 57 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
michael@0 | 58 | EXPORTS += [ |
michael@0 | 59 | 'gfxAndroidPlatform.h', |
michael@0 | 60 | 'gfxFT2FontBase.h', |
michael@0 | 61 | 'gfxFT2Fonts.h', |
michael@0 | 62 | 'gfxPDFSurface.h', |
michael@0 | 63 | ] |
michael@0 | 64 | SOURCES += [ |
michael@0 | 65 | 'gfxAndroidPlatform.cpp', |
michael@0 | 66 | 'gfxFT2FontBase.cpp', |
michael@0 | 67 | 'gfxFT2FontList.cpp', |
michael@0 | 68 | 'gfxFT2Fonts.cpp', |
michael@0 | 69 | 'gfxFT2Utils.cpp', |
michael@0 | 70 | 'gfxPDFSurface.cpp', |
michael@0 | 71 | ] |
michael@0 | 72 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
michael@0 | 73 | EXPORTS += [ |
michael@0 | 74 | 'gfxAndroidPlatform.h', |
michael@0 | 75 | 'gfxFT2FontBase.h', |
michael@0 | 76 | 'gfxFT2Fonts.h', |
michael@0 | 77 | 'gfxPDFSurface.h', |
michael@0 | 78 | ] |
michael@0 | 79 | SOURCES += [ |
michael@0 | 80 | 'gfxAndroidPlatform.cpp', |
michael@0 | 81 | 'gfxFT2FontBase.cpp', |
michael@0 | 82 | 'gfxFT2FontList.cpp', |
michael@0 | 83 | 'gfxFT2Fonts.cpp', |
michael@0 | 84 | 'gfxFT2Utils.cpp', |
michael@0 | 85 | 'gfxPDFSurface.cpp', |
michael@0 | 86 | ] |
michael@0 | 87 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
michael@0 | 88 | EXPORTS += [ |
michael@0 | 89 | 'gfxPlatformMac.h', |
michael@0 | 90 | 'gfxQuartzImageSurface.h', |
michael@0 | 91 | 'gfxQuartzNativeDrawing.h', |
michael@0 | 92 | 'gfxQuartzSurface.h', |
michael@0 | 93 | ] |
michael@0 | 94 | SOURCES += [ |
michael@0 | 95 | 'gfxCoreTextShaper.cpp', |
michael@0 | 96 | 'gfxMacFont.cpp', |
michael@0 | 97 | 'gfxPlatformMac.cpp', |
michael@0 | 98 | 'gfxQuartzImageSurface.cpp', |
michael@0 | 99 | 'gfxQuartzNativeDrawing.cpp', |
michael@0 | 100 | 'gfxQuartzSurface.cpp', |
michael@0 | 101 | ] |
michael@0 | 102 | elif CONFIG['MOZ_WIDGET_GTK']: |
michael@0 | 103 | EXPORTS += [ |
michael@0 | 104 | 'gfxFT2FontBase.h', |
michael@0 | 105 | 'gfxGdkNativeRenderer.h', |
michael@0 | 106 | 'gfxPangoFonts.h', |
michael@0 | 107 | 'gfxPDFSurface.h', |
michael@0 | 108 | 'gfxPlatformGtk.h', |
michael@0 | 109 | 'gfxPSSurface.h', |
michael@0 | 110 | ] |
michael@0 | 111 | |
michael@0 | 112 | SOURCES += [ |
michael@0 | 113 | 'gfxFontconfigUtils.cpp', |
michael@0 | 114 | 'gfxFT2FontBase.cpp', |
michael@0 | 115 | 'gfxFT2Utils.cpp', |
michael@0 | 116 | 'gfxGdkNativeRenderer.cpp', |
michael@0 | 117 | 'gfxPangoFonts.cpp', |
michael@0 | 118 | 'gfxPDFSurface.cpp', |
michael@0 | 119 | 'gfxPlatformGtk.cpp', |
michael@0 | 120 | 'gfxPSSurface.cpp', |
michael@0 | 121 | ] |
michael@0 | 122 | |
michael@0 | 123 | if CONFIG['MOZ_X11']: |
michael@0 | 124 | EXPORTS += [ |
michael@0 | 125 | 'gfxXlibNativeRenderer.h', |
michael@0 | 126 | 'gfxXlibSurface.h', |
michael@0 | 127 | ] |
michael@0 | 128 | SOURCES += [ |
michael@0 | 129 | 'gfxXlibNativeRenderer.cpp', |
michael@0 | 130 | 'gfxXlibSurface.cpp', |
michael@0 | 131 | ] |
michael@0 | 132 | |
michael@0 | 133 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': |
michael@0 | 134 | EXPORTS += [ |
michael@0 | 135 | 'gfxFT2FontBase.h', |
michael@0 | 136 | 'gfxPangoFonts.h', |
michael@0 | 137 | 'gfxPDFSurface.h', |
michael@0 | 138 | 'gfxQPainterSurface.h', |
michael@0 | 139 | 'gfxQtNativeRenderer.h', |
michael@0 | 140 | 'gfxQtPlatform.h', |
michael@0 | 141 | ] |
michael@0 | 142 | SOURCES += [ |
michael@0 | 143 | 'gfxFontconfigUtils.cpp', |
michael@0 | 144 | 'gfxFT2FontBase.cpp', |
michael@0 | 145 | 'gfxFT2Utils.cpp', |
michael@0 | 146 | 'gfxPangoFonts.cpp', |
michael@0 | 147 | 'gfxPDFSurface.cpp', |
michael@0 | 148 | 'gfxQPainterSurface.cpp', |
michael@0 | 149 | 'gfxQtPlatform.cpp', |
michael@0 | 150 | ] |
michael@0 | 151 | |
michael@0 | 152 | if CONFIG['MOZ_X11']: |
michael@0 | 153 | EXPORTS += [ |
michael@0 | 154 | 'gfxXlibSurface.h', |
michael@0 | 155 | ] |
michael@0 | 156 | SOURCES += [ |
michael@0 | 157 | 'gfxQtNativeRenderer.cpp', |
michael@0 | 158 | 'gfxXlibSurface.cpp', |
michael@0 | 159 | ] |
michael@0 | 160 | |
michael@0 | 161 | elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
michael@0 | 162 | EXPORTS += [ |
michael@0 | 163 | 'gfxD2DSurface.h', |
michael@0 | 164 | 'gfxDWriteFonts.h', |
michael@0 | 165 | 'gfxGDIFont.h', |
michael@0 | 166 | 'gfxGDIFontList.h', |
michael@0 | 167 | 'gfxPDFSurface.h', |
michael@0 | 168 | 'gfxPlatformFontList.h', |
michael@0 | 169 | 'gfxWindowsNativeDrawing.h', |
michael@0 | 170 | 'gfxWindowsPlatform.h', |
michael@0 | 171 | 'gfxWindowsSurface.h', |
michael@0 | 172 | ] |
michael@0 | 173 | # gfxGDIFontList.cpp and gfxGDIShaper.cpp force NSPR logging, so they cannot be built in unified mode. |
michael@0 | 174 | SOURCES += [ |
michael@0 | 175 | 'gfxGDIFont.cpp', |
michael@0 | 176 | 'gfxGDIFontList.cpp', |
michael@0 | 177 | 'gfxGDIShaper.cpp', |
michael@0 | 178 | 'gfxPDFSurface.cpp', |
michael@0 | 179 | 'gfxUniscribeShaper.cpp', |
michael@0 | 180 | 'gfxWindowsNativeDrawing.cpp', |
michael@0 | 181 | 'gfxWindowsPlatform.cpp', |
michael@0 | 182 | 'gfxWindowsSurface.cpp', |
michael@0 | 183 | ] |
michael@0 | 184 | if CONFIG['MOZ_ENABLE_DWRITE_FONT']: |
michael@0 | 185 | # gfxDWriteFontList.cpp forces NSPR logging, so it cannot be built in unified mode. |
michael@0 | 186 | SOURCES += [ |
michael@0 | 187 | 'gfxD2DSurface.cpp', |
michael@0 | 188 | 'gfxDWriteCommon.cpp', |
michael@0 | 189 | 'gfxDWriteFontList.cpp', |
michael@0 | 190 | 'gfxDWriteFonts.cpp', |
michael@0 | 191 | 'gfxDWriteShaper.cpp', |
michael@0 | 192 | 'gfxDWriteTextAnalysis.cpp', |
michael@0 | 193 | ] |
michael@0 | 194 | |
michael@0 | 195 | # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp. |
michael@0 | 196 | if CONFIG['INTEL_ARCHITECTURE']: |
michael@0 | 197 | SOURCES += ['gfxAlphaRecoverySSE2.cpp'] |
michael@0 | 198 | # The file uses SSE2 intrinsics, so it needs special compile flags on some |
michael@0 | 199 | # compilers. |
michael@0 | 200 | SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] |
michael@0 | 201 | |
michael@0 | 202 | SOURCES += [ |
michael@0 | 203 | # Includes mac system header conflicting with point/size, |
michael@0 | 204 | # and includes glxXlibSurface.h which drags in Xrender.h |
michael@0 | 205 | 'gfxASurface.cpp', |
michael@0 | 206 | # on X11, gfxDrawable.cpp includes X headers for an old workaround which |
michael@0 | 207 | # we could consider removing soon (affects Ubuntus older than 10.04 LTS) |
michael@0 | 208 | # which currently prevent it from joining UNIFIED_SOURCES. |
michael@0 | 209 | 'gfxDrawable.cpp', |
michael@0 | 210 | # Uses FORCE_PR_LOG |
michael@0 | 211 | 'gfxFont.cpp', |
michael@0 | 212 | # Uses FORCE_PR_LOG |
michael@0 | 213 | 'gfxFontUtils.cpp', |
michael@0 | 214 | # Includes mac system header conflicting with point/size, and also uses FORCE_PR_LOG |
michael@0 | 215 | 'gfxPlatform.cpp', |
michael@0 | 216 | # Uses FORCE_PR_LOG |
michael@0 | 217 | 'gfxPlatformFontList.cpp', |
michael@0 | 218 | 'gfxPrefs.cpp', |
michael@0 | 219 | # Uses FORCE_PR_LOG |
michael@0 | 220 | 'gfxUserFontSet.cpp', |
michael@0 | 221 | ] |
michael@0 | 222 | |
michael@0 | 223 | UNIFIED_SOURCES += [ |
michael@0 | 224 | 'CJKCompatSVS.cpp', |
michael@0 | 225 | 'gfx3DMatrix.cpp', |
michael@0 | 226 | 'gfxAlphaRecovery.cpp', |
michael@0 | 227 | 'gfxBaseSharedMemorySurface.cpp', |
michael@0 | 228 | 'gfxBlur.cpp', |
michael@0 | 229 | 'gfxCachedTempSurface.cpp', |
michael@0 | 230 | 'gfxContext.cpp', |
michael@0 | 231 | 'gfxFontFeatures.cpp', |
michael@0 | 232 | 'gfxFontInfoLoader.cpp', |
michael@0 | 233 | 'gfxFontMissingGlyphs.cpp', |
michael@0 | 234 | 'gfxFontTest.cpp', |
michael@0 | 235 | 'gfxGradientCache.cpp', |
michael@0 | 236 | 'gfxGraphiteShaper.cpp', |
michael@0 | 237 | 'gfxHarfBuzzShaper.cpp', |
michael@0 | 238 | 'gfxImageSurface.cpp', |
michael@0 | 239 | 'gfxMathTable.cpp', |
michael@0 | 240 | 'gfxMatrix.cpp', |
michael@0 | 241 | 'gfxPath.cpp', |
michael@0 | 242 | 'gfxPattern.cpp', |
michael@0 | 243 | 'gfxRect.cpp', |
michael@0 | 244 | 'gfxReusableImageSurfaceWrapper.cpp', |
michael@0 | 245 | 'gfxReusableSharedImageSurfaceWrapper.cpp', |
michael@0 | 246 | 'gfxScriptItemizer.cpp', |
michael@0 | 247 | 'gfxSkipChars.cpp', |
michael@0 | 248 | 'gfxSVGGlyphs.cpp', |
michael@0 | 249 | 'gfxTeeSurface.cpp', |
michael@0 | 250 | 'gfxUtils.cpp', |
michael@0 | 251 | 'nsSurfaceTexture.cpp', |
michael@0 | 252 | 'nsUnicodeRange.cpp', |
michael@0 | 253 | ] |
michael@0 | 254 | |
michael@0 | 255 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
michael@0 | 256 | # gfxMacPlatformFontList.mm forces NSPR logging so it cannot be built in unified mode. |
michael@0 | 257 | SOURCES += [ |
michael@0 | 258 | 'gfxMacPlatformFontList.mm', |
michael@0 | 259 | ] |
michael@0 | 260 | |
michael@0 | 261 | FAIL_ON_WARNINGS = not CONFIG['_MSC_VER'] |
michael@0 | 262 | |
michael@0 | 263 | MSVC_ENABLE_PGO = True |
michael@0 | 264 | |
michael@0 | 265 | LIBRARY_NAME = 'thebes' |
michael@0 | 266 | |
michael@0 | 267 | include('/ipc/chromium/chromium-config.mozbuild') |
michael@0 | 268 | |
michael@0 | 269 | FINAL_LIBRARY = 'xul' |
michael@0 | 270 | |
michael@0 | 271 | GENERATED_FILES = [ |
michael@0 | 272 | 'DeprecatedPremultiplyTables.h', |
michael@0 | 273 | ] |
michael@0 | 274 | |
michael@0 | 275 | LOCAL_INCLUDES += [ |
michael@0 | 276 | '/content/xml/document/src', |
michael@0 | 277 | ] |
michael@0 | 278 | |
michael@0 | 279 | if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'): |
michael@0 | 280 | DEFINES['MOZ_ENABLE_FREETYPE'] = True |
michael@0 | 281 | |
michael@0 | 282 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
michael@0 | 283 | for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'): |
michael@0 | 284 | if CONFIG[var]: |
michael@0 | 285 | DEFINES[var] = True |
michael@0 | 286 | |
michael@0 | 287 | if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
michael@0 | 288 | # This is set for "normal Android", that is, when Gecko is running on |
michael@0 | 289 | # top of the android java runtime. |
michael@0 | 290 | DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True |
michael@0 | 291 | |
michael@0 | 292 | DEFINES['GRAPHITE2_STATIC'] = True |
michael@0 | 293 | |
michael@0 | 294 | if CONFIG['OS_TARGET'] == 'WINNT': |
michael@0 | 295 | DEFINES['OTS_DLL'] = True |