tor-browser

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

moz.build (2226B)


      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 include("rlbox.mozbuild")
      8 
      9 RLBoxLibrary("rlbox")
     10 
     11 LOCAL_INCLUDES += [
     12     "/third_party/simde/",
     13     "/third_party/wasm2c/wasm2c/",
     14 ]
     15 
     16 EXPORTS += [
     17     "/third_party/wasm2c/wasm2c/wasm-rt.h",
     18 ]
     19 
     20 FINAL_LIBRARY = "xul"
     21 
     22 # Allow compiler warnings both in wasm compiles (because they're third-party
     23 # libraries), and C compiles (because they're code generated by wasm2c).
     24 AllowCompilerWarnings()
     25 
     26 WASM_DEFINES["MOZILLA_CLIENT"] = True
     27 
     28 if CONFIG["MOZ_WASM_SANDBOXING_HUNSPELL"]:
     29     include("/extensions/spellcheck/hunspell/src/sources.mozbuild")
     30     WASM_SOURCES += [
     31         "/extensions/spellcheck/hunspell/src/" + s for s in hunspell_sources
     32     ]
     33     if CONFIG["MOZ_WASI_EMULATED_CLOCK"]:
     34         WASM_DEFINES["_WASI_EMULATED_PROCESS_CLOCKS"] = True
     35         WASM_LIBS += ["wasi-emulated-process-clocks"]
     36     LOCAL_INCLUDES += [
     37         "/extensions/spellcheck/hunspell/glue",
     38         "/extensions/spellcheck/hunspell/src",
     39     ]
     40 
     41 if CONFIG["MOZ_WASM_SANDBOXING_GRAPHITE"]:
     42     include("/gfx/graphite2/src/sources.mozbuild")
     43     WASM_SOURCES += ["/gfx/graphite2/src/" + s for s in graphite_sources]
     44     WASM_SOURCES += [
     45         "/gfx/graphite2/src/call_machine.cpp",
     46     ]
     47     for k, v in graphite_defines:
     48         WASM_DEFINES[k] = v
     49     LOCAL_INCLUDES += ["/gfx/graphite2/src"]
     50 
     51 if CONFIG["MOZ_WASM_SANDBOXING_OGG"]:
     52     include("/media/libogg/sources.mozbuild")
     53     WASM_SOURCES += ["/media/libogg/" + s for s in ogg_sources]
     54     LOCAL_INCLUDES += ["/media/libogg"]
     55 
     56 if CONFIG["MOZ_WASM_SANDBOXING_EXPAT"]:
     57     include("/parser/expat/sources.mozbuild")
     58     WASM_SOURCES += ["/parser/expat/" + s for s in expat_sources]
     59     for k, v in expat_defines:
     60         WASM_DEFINES[k] = v
     61     LOCAL_INCLUDES += ["/parser/expat/expat/lib/"]
     62 
     63 if CONFIG["MOZ_WASM_SANDBOXING_WOFF2"]:
     64     include("/modules/woff2/sources.mozbuild")
     65     WASM_SOURCES += ["/modules/woff2/" + s for s in woff2_sources]
     66     LOCAL_INCLUDES += ["/modules/woff2/include"]