tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (6229B)


      1 # -*- Mode: python; 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 with Files("**"):
      8     BUG_COMPONENT = ("Core", "Graphics: Canvas2D")
      9 
     10 with Files("TexUnpackBlob.cpp"):
     11     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     12 
     13 with Files("WebGL*"):
     14     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     15 
     16 with Files("test/webgl-conf/**"):
     17     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     18 
     19 with Files("test/webgl-mochitest/**"):
     20     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     21 
     22 with Files("test/reftest/webgl*"):
     23     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     24 
     25 with Files("test/chrome/*webgl*"):
     26     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     27 
     28 with Files("test/crossorigin/*webgl*"):
     29     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
     30 
     31 # Change the following line(s) to avoid bug 1081323 (clobber after changing a manifest):
     32 # * Adjust failure errata for webgl-conf.
     33 
     34 MOCHITEST_MANIFESTS += [
     35     "test/crash/mochitest.toml",
     36     "test/crossorigin/mochitest.toml",
     37     "test/mochitest.toml",
     38     "test/webgl-conf/generated-mochitest.toml",
     39     "test/webgl-mochitest/mochitest.toml",
     40 ]
     41 
     42 MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.toml"]
     43 
     44 EXPORTS += [
     45     "nsICanvasRenderingContextInternal.h",
     46 ]
     47 
     48 EXPORTS.mozilla += [
     49     "IsEnumCase.h",
     50     "ParamTraits_IsEnumCase.h",
     51     "ParamTraits_STL.h",
     52     "ParamTraits_TiedFields.h",
     53     "TiedFields.h",
     54     "TupleUtils.h",
     55 ]
     56 
     57 EXPORTS.mozilla.dom += [
     58     "CanvasGradient.h",
     59     "CanvasPath.h",
     60     "CanvasPattern.h",
     61     "CanvasRenderingContext2D.h",
     62     "CanvasRenderingContextHelper.h",
     63     "CanvasUtils.h",
     64     "DmdStdContainers.h",
     65     "GeneratePlaceholderCanvasData.h",
     66     "ImageBitmap.h",
     67     "ImageBitmapRenderingContext.h",
     68     "ImageBitmapSource.h",
     69     "ImageData.h",
     70     "ImageUtils.h",
     71     "OffscreenCanvas.h",
     72     "OffscreenCanvasDisplayHelper.h",
     73     "OffscreenCanvasRenderingContext2D.h",
     74     "QueueParamTraits.h",
     75     "TextMetrics.h",
     76     "WebGLChild.h",
     77     "WebGLCommandQueue.h",
     78     "WebGLIpdl.h",
     79     "WebGLParent.h",
     80     "WebGLTexelConversions.h",
     81     "WebGLTypes.h",
     82     "XRWebGLLayer.h",
     83 ]
     84 # XRWebGLLayer.h must be exported for use by the generated WebXRBinding.h
     85 
     86 EXPORTS.mozilla.gfx += [
     87     "DrawTargetWebgl.h",
     88 ]
     89 
     90 # Canvas 2D and common sources
     91 #
     92 # Due to bug 1745384, and the associated clang mingw cross compile crash, we
     93 # must be careful about disturbing the unified file combinations.
     94 # nsICanvasRenderingContextInternal.cpp cannot be built standalone until this
     95 # is resolved, so new files may need to be added to SOURCES for the time being.
     96 UNIFIED_SOURCES += [
     97     "CanvasGradient.cpp",
     98     "CanvasImageCache.cpp",
     99     "CanvasPattern.cpp",
    100     "CanvasRenderingContext2D.cpp",
    101     "CanvasRenderingContextHelper.cpp",
    102     "CanvasUtils.cpp",
    103     "ImageBitmap.cpp",
    104     "ImageBitmapRenderingContext.cpp",
    105     "ImageData.cpp",
    106     "nsICanvasRenderingContextInternal.cpp",
    107     "OffscreenCanvas.cpp",
    108     "XRWebGLLayer.cpp",
    109 ]
    110 
    111 SOURCES += [
    112     "DrawTargetWebgl.cpp",  # Isolate Skia
    113     "FilterNodeWebgl.cpp",
    114     "ImageUtils.cpp",
    115     "OffscreenCanvasDisplayHelper.cpp",  # See bug 1745384
    116     "OffscreenCanvasRenderingContext2D.cpp",  # See bug 1745384
    117     "SourceSurfaceWebgl.cpp",
    118 ]
    119 
    120 # WebGL Sources
    121 UNIFIED_SOURCES += [
    122     "CacheInvalidator.cpp",
    123     "ClientWebGLContext.cpp",
    124     "ClientWebGLExtensions.cpp",
    125     "HostWebGLContext.cpp",
    126     "SanitizeRenderer.cpp",
    127     "TexUnpackBlob.cpp",
    128     "WebGL2Context.cpp",
    129     "WebGL2ContextBuffers.cpp",
    130     "WebGL2ContextFramebuffers.cpp",
    131     "WebGL2ContextMRTs.cpp",
    132     "WebGL2ContextQueries.cpp",
    133     "WebGL2ContextRenderbuffers.cpp",
    134     "WebGL2ContextSamplers.cpp",
    135     "WebGL2ContextState.cpp",
    136     "WebGL2ContextSync.cpp",
    137     "WebGL2ContextTransformFeedback.cpp",
    138     "WebGL2ContextUniforms.cpp",
    139     "WebGLBuffer.cpp",
    140     "WebGLChild.cpp",
    141     "WebGLContext.cpp",
    142     "WebGLContextBuffers.cpp",
    143     "WebGLContextDraw.cpp",
    144     "WebGLContextExtensions.cpp",
    145     "WebGLContextFramebufferOperations.cpp",
    146     "WebGLContextGL.cpp",
    147     "WebGLContextLossHandler.cpp",
    148     "WebGLContextState.cpp",
    149     "WebGLContextTextures.cpp",
    150     "WebGLContextUtils.cpp",
    151     "WebGLContextValidate.cpp",
    152     "WebGLContextVertexArray.cpp",
    153     "WebGLContextVertices.cpp",
    154     "WebGLExtensions.cpp",
    155     "WebGLFormats.cpp",
    156     "WebGLFramebuffer.cpp",
    157     "WebGLMemoryTracker.cpp",
    158     "WebGLParent.cpp",
    159     "WebGLProgram.cpp",
    160     "WebGLQuery.cpp",
    161     "WebGLRenderbuffer.cpp",
    162     "WebGLSampler.cpp",
    163     "WebGLShader.cpp",
    164     "WebGLShaderValidator.cpp",
    165     "WebGLSync.cpp",
    166     "WebGLTexelConversions.cpp",
    167     "WebGLTexture.cpp",
    168     "WebGLTextureUpload.cpp",
    169     "WebGLTransformFeedback.cpp",
    170     "WebGLValidateStrings.cpp",
    171     "WebGLVertexArray.cpp",
    172     "WebGLVertexArrayFake.cpp",
    173     "WebGLVertexArrayGL.cpp",
    174 ]
    175 
    176 SOURCES += [
    177     "MurmurHash3.cpp",
    178 ]
    179 
    180 IPDL_SOURCES += [
    181     "PWebGL.ipdl",
    182 ]
    183 
    184 TEST_DIRS += [
    185     "gtest",
    186 ]
    187 
    188 # Suppress warnings from third-party code.
    189 SOURCES["MurmurHash3.cpp"].flags += ["-Wno-implicit-fallthrough"]
    190 
    191 LOCAL_INCLUDES += [
    192     "/js/xpconnect/wrappers",
    193 ]
    194 
    195 include("/ipc/chromium/chromium-config.mozbuild")
    196 
    197 
    198 USE_LIBS += ["translator"]  # Grab the Angle shader translator.
    199 
    200 FINAL_LIBRARY = "xul"
    201 LOCAL_INCLUDES += [
    202     "/dom/base",
    203     "/dom/html",
    204     "/dom/svg",
    205     "/dom/workers",
    206     "/dom/xul",
    207     "/gfx/angle/checkout/include",
    208     "/gfx/cairo/cairo/src",
    209     "/gfx/gl",
    210     "/image",
    211     "/js/xpconnect/src",
    212     "/layout/generic",
    213     "/layout/style",
    214     "/layout/xul",
    215     "/media/libyuv/libyuv/include",
    216 ]
    217 
    218 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
    219     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
    220 
    221 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
    222 
    223 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
    224     CXXFLAGS += ["-Werror=implicit-int-conversion", "-Wno-shorten-64-to-32"]
    225     CXXFLAGS += ["-Werror=switch"]
    226 
    227 if CONFIG["CC_TYPE"] == "gcc":
    228     CXXFLAGS += ["-Wno-error=unused-result"]  # GCC doesn't ignore (void)MustUse();
    229 
    230 # Add libFuzzer configuration directives
    231 include("/tools/fuzzing/libfuzzer-config.mozbuild")