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/.
7 include("rlbox.mozbuild")
12 "/third_party/simde/",
13 "/third_party/wasm2c/wasm2c/",
17 "/third_party/wasm2c/wasm2c/wasm-rt.h",
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()
26 WASM_DEFINES["MOZILLA_CLIENT"] = True
28 if CONFIG["MOZ_WASM_SANDBOXING_HUNSPELL"]:
29 include("/extensions/spellcheck/hunspell/src/sources.mozbuild")
31 "/extensions/spellcheck/hunspell/src/" + s for s in hunspell_sources
33 if CONFIG["MOZ_WASI_EMULATED_CLOCK"]:
34 WASM_DEFINES["_WASI_EMULATED_PROCESS_CLOCKS"] = True
35 WASM_LIBS += ["wasi-emulated-process-clocks"]
37 "/extensions/spellcheck/hunspell/glue",
38 "/extensions/spellcheck/hunspell/src",
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]
45 "/gfx/graphite2/src/call_machine.cpp",
47 for k, v in graphite_defines:
49 LOCAL_INCLUDES += ["/gfx/graphite2/src"]
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"]
56 if CONFIG["MOZ_WASM_SANDBOXING_EXPAT"]:
57 include("/parser/expat/lib/sources.mozbuild")
58 WASM_SOURCES += ["/parser/expat/lib/" + s for s in expat_sources]
59 for k, v in expat_defines:
61 LOCAL_INCLUDES += ["/parser/expat/lib/"]
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"]