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
7FINAL_LIBRARY = "js"
8
9# Includes should be relative to parent path
10LOCAL_INCLUDES += ["!..", ".."]
11
12include("../js-config.mozbuild")
13include("../js-cxxflags.mozbuild")
14
15if CONFIG["ENABLE_WASM_CRANELIFT"]:
16    UNIFIED_SOURCES += [
17        "WasmCraneliftCompile.cpp",
18    ]
19
20UNIFIED_SOURCES += [
21    "AsmJS.cpp",
22    "TypedObject.cpp",
23    "WasmBaselineCompile.cpp",
24    "WasmBinary.cpp",
25    "WasmBuiltins.cpp",
26    "WasmCode.cpp",
27    "WasmCompile.cpp",
28    "WasmContext.cpp",
29    "WasmDebug.cpp",
30    "WasmFrame.cpp",
31    "WasmFrameIter.cpp",
32    "WasmGC.cpp",
33    "WasmGenerator.cpp",
34    "WasmInitExpr.cpp",
35    "WasmInstance.cpp",
36    "WasmIonCompile.cpp",
37    "WasmJS.cpp",
38    "WasmModule.cpp",
39    "WasmOpIter.cpp",
40    "WasmProcess.cpp",
41    "WasmRealm.cpp",
42    "WasmStubs.cpp",
43    "WasmTable.cpp",
44    "WasmTlsData.cpp",
45    "WasmTypeDef.cpp",
46    "WasmTypes.cpp",
47    "WasmValidate.cpp",
48    "WasmValType.cpp",
49    "WasmValue.cpp",
50]
51
52# We don't support signals for wasi yet.
53if CONFIG["OS_ARCH"] != "WASI":
54    UNIFIED_SOURCES += ["WasmSignalHandlers.cpp"]
55
56# Make sure all WebAssembly code is built with libfuzzer
57# coverage instrumentation in FUZZING mode.
58if CONFIG["FUZZING_INTERFACES"] and CONFIG["LIBFUZZER"]:
59    include("/tools/fuzzing/libfuzzer-config.mozbuild")
60