tor-browser

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

commit 84128fbb5641caea8c894ab07427771df6c17ed6
parent 22e0ba8c7bd3ec24b9fe19f9f419a13c47fd68a1
Author: André Bargull <andre.bargull@gmail.com>
Date:   Mon, 22 Dec 2025 15:18:02 +0000

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

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

Diffstat:
Ajs/src/ctypes/moz.build | 31+++++++++++++++++++++++++++++++
Mjs/src/moz.build | 18+++---------------
2 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/js/src/ctypes/moz.build b/js/src/ctypes/moz.build @@ -0,0 +1,31 @@ +# -*- 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") + +SOURCES += [ + "CTypes.cpp", + "Library.cpp", +] + +if not CONFIG["MOZ_SYSTEM_FFI"]: + LOCAL_INCLUDES += [ + "!libffi/include", + "libffi/src/%s" % CONFIG["FFI_TARGET_DIR"], + ] + +if CONFIG["MOZ_SYSTEM_FFI"]: + CXXFLAGS += CONFIG["MOZ_FFI_CFLAGS"] + +if CONFIG["FUZZING_JS_FUZZILLI"]: + include("/tools/fuzzing/libfuzzer-config.mozbuild") diff --git a/js/src/moz.build b/js/src/moz.build @@ -300,17 +300,6 @@ if CONFIG["MOZ_INSTRUMENTS"]: "devtools/Instruments.cpp", ] -if CONFIG["JS_HAS_CTYPES"]: - SOURCES += [ - "ctypes/CTypes.cpp", - "ctypes/Library.cpp", - ] - if not CONFIG["MOZ_SYSTEM_FFI"]: - LOCAL_INCLUDES += [ - "!ctypes/libffi/include", - "ctypes/libffi/src/%s" % CONFIG["FFI_TARGET_DIR"], - ] - if CONFIG["MOZ_VTUNE"]: SOURCES += [ "vtune/ittnotify_static.c", @@ -344,6 +333,9 @@ DIRS += [ "xsum", ] +if CONFIG["JS_HAS_CTYPES"]: + DIRS += ["ctypes"] + if CONFIG["JS_HAS_INTL_API"]: DIRS += ["builtin/intl", "builtin/temporal"] @@ -373,10 +365,6 @@ GeneratedFile( inputs=["../../modules/libpref/init/StaticPrefList.yaml"], ) -if CONFIG["JS_HAS_CTYPES"]: - if CONFIG["MOZ_SYSTEM_FFI"]: - CXXFLAGS += CONFIG["MOZ_FFI_CFLAGS"] - if CONFIG["JS_HAS_INTL_API"]: if CONFIG["JS_STANDALONE"]: DIRS += [