Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_pow...
[gecko.git] / js / src / shell / moz.build
blobed8551f1ec6d9fa28c0668a796c0a0dfaf12031e
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 GeckoProgram("js", linkage=None)
8 if CONFIG["JS_BUNDLED_EDITLINE"]:
9     DIRS += ["../editline"]
10     USE_LIBS += ["editline"]
11 USE_LIBS += ["static:js"]
13 include("../js-config.mozbuild")
14 include("../js-cxxflags.mozbuild")
15 include("../js-standalone.mozbuild")
17 UNIFIED_SOURCES += [
18     "js.cpp",
19     "jsoptparse.cpp",
20     "jsshell.cpp",
21     "ModuleLoader.cpp",
22     "OSObject.cpp",
23     "ShellModuleObjectWrapper.cpp",
24     "WasmTesting.cpp",
27 if CONFIG["FUZZING_INTERFACES"]:
28     UNIFIED_SOURCES += ["jsrtfuzzing/jsrtfuzzing.cpp"]
29     USE_LIBS += [
30         "static:fuzzer",
31     ]
33 if CONFIG["FUZZING_JS_FUZZILLI"]:
34     OS_LIBS += ["rt"]
36 DEFINES["EXPORT_JS_API"] = True
38 LOCAL_INCLUDES += [
39     "!..",
40     "..",
43 OS_LIBS += CONFIG["EDITLINE_LIBS"]
45 # Place a GDB Python auto-load file next to the shell executable, both in
46 # the build directory and in the dist/bin directory.
47 FINAL_TARGET_FILES += ["js-gdb.py"]
48 OBJDIR_FILES.js.src.shell += ["!/dist/bin/js-gdb.py"]
50 # People expect the js shell to wind up in the top-level JS dir.
51 OBJDIR_FILES.js.src += ["!/dist/bin/js%s" % CONFIG["BIN_SUFFIX"]]
53 # Stack size on Wasm/WASI
54 # ==================================
55 # Increase the default stack size (64KB) to 1MB.
56 # Also make the stack grow towards 0 so that if SpiderMonkey's stack limiter is buggy, overflow will likely trap.
57 if CONFIG["OS_ARCH"] == "WASI":
58     LDFLAGS += ["-Wl,-z,stack-size=1048576", "-Wl,--stack-first"]
59     OS_LIBS += ["wasi-emulated-process-clocks", "wasi-emulated-getpid"]