tor-browser

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

commit b2f3b1d06f5c078c9c1bbe49fba188a1e6353cdb
parent 603da8f44da38ea2ee1a1697cd05b70dca1b6c9d
Author: André Bargull <andre.bargull@gmail.com>
Date:   Mon, 22 Dec 2025 15:18:01 +0000

Bug 1504045 - Part 5: Add moz.build for js/src/threading. r=jandem

Differential Revision: https://phabricator.services.mozilla.com/D276617

Diffstat:
Mjs/src/moz.build | 24+-----------------------
Ajs/src/threading/moz.build | 43+++++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 23 deletions(-)

diff --git a/js/src/moz.build b/js/src/moz.build @@ -306,9 +306,6 @@ UNIFIED_SOURCES += [ "jsexn.cpp", "jsfriendapi.cpp", "jsnum.cpp", - "threading/Mutex.cpp", - "threading/ProtectedData.cpp", - "threading/Thread.cpp", "vm/Activation.cpp", "vm/ArgumentsObject.cpp", "vm/ArrayBufferObject.cpp", @@ -440,26 +437,6 @@ if CONFIG["MOZ_INSTRUMENTS"]: "devtools/Instruments.cpp", ] -if CONFIG["OS_ARCH"] == "WINNT": - OS_LIBS += [ - "advapi32", - ] - UNIFIED_SOURCES += [ - "threading/windows/CpuCount.cpp", - "threading/windows/WindowsThread.cpp", - ] -# WASI hasn't supported thread yet so noop implementation is used. -elif CONFIG["OS_ARCH"] == "WASI": - UNIFIED_SOURCES += [ - "threading/noop/CpuCount.cpp", - "threading/noop/NoopThread.cpp", - ] -else: - UNIFIED_SOURCES += [ - "threading/posix/CpuCount.cpp", - "threading/posix/PosixThread.cpp", - ] - if CONFIG["JS_HAS_CTYPES"]: SOURCES += [ "ctypes/CTypes.cpp", @@ -497,6 +474,7 @@ DIRS += [ "irregexp", "jit", "proxy", + "threading", "util", "wasm", "xsum", diff --git a/js/src/threading/moz.build b/js/src/threading/moz.build @@ -0,0 +1,43 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +FINAL_LIBRARY = "js" + +# Includes should be relative to parent path +LOCAL_INCLUDES += ["!..", ".."] + +include("../js-compileflags.mozbuild") +include("../js-config.mozbuild") +include("../js-cxxflags.mozbuild") + +UNIFIED_SOURCES += [ + "Mutex.cpp", + "ProtectedData.cpp", + "Thread.cpp", +] + +if CONFIG["OS_ARCH"] == "WINNT": + OS_LIBS += [ + "advapi32", + ] + UNIFIED_SOURCES += [ + "windows/CpuCount.cpp", + "windows/WindowsThread.cpp", + ] +# WASI hasn't supported thread yet so noop implementation is used. +elif CONFIG["OS_ARCH"] == "WASI": + UNIFIED_SOURCES += [ + "noop/CpuCount.cpp", + "noop/NoopThread.cpp", + ] +else: + UNIFIED_SOURCES += [ + "posix/CpuCount.cpp", + "posix/PosixThread.cpp", + ] + +if CONFIG["FUZZING_JS_FUZZILLI"]: + include("/tools/fuzzing/libfuzzer-config.mozbuild")