tor-browser

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

commit ff6a6d24022bb152a7e59b6802cd45cbb3255029
parent 748ce54e75c44e440e9619c85713b4b774c27d2a
Author: André Bargull <andre.bargull@gmail.com>
Date:   Fri, 12 Dec 2025 17:38:13 +0000

Bug 2005531 - Part 1: Add separate moz.build for js/src/builtin/intl. r=spidermonkey-reviewers,dminor

Use a separate moz.build file to ensure all Intl related cpp-files will end up
in the same unified bundle, which could improve compilation. And it also makes
it easier to run IWYU analysis, because now `FILES_PER_UNIFIED_FILE = 1` can be
set for just "js/src/builtin/intl".

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

Diffstat:
Ajs/src/builtin/intl/moz.build | 35+++++++++++++++++++++++++++++++++++
Mjs/src/moz.build | 21+--------------------
2 files changed, 36 insertions(+), 20 deletions(-)

diff --git a/js/src/builtin/intl/moz.build b/js/src/builtin/intl/moz.build @@ -0,0 +1,35 @@ +# -*- 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-config.mozbuild") +include("../../js-cxxflags.mozbuild") + +LOCAL_INCLUDES += [ + "/intl/icu_capi/bindings/cpp", +] + +UNIFIED_SOURCES += [ + "Collator.cpp", + "CommonFunctions.cpp", + "DateTimeFormat.cpp", + "DisplayNames.cpp", + "DurationFormat.cpp", + "GlobalIntlData.cpp", + "IntlObject.cpp", + "LanguageTag.cpp", + "ListFormat.cpp", + "Locale.cpp", + "NumberFormat.cpp", + "PluralRules.cpp", + "RelativeTimeFormat.cpp", + "Segmenter.cpp", + "SharedIntlData.cpp", +] diff --git a/js/src/moz.build b/js/src/moz.build @@ -477,25 +477,6 @@ if CONFIG["ENABLE_EXPLICIT_RESOURCE_MANAGEMENT"]: "vm/DisposableRecord.cpp", ] -if CONFIG["JS_HAS_INTL_API"]: - UNIFIED_SOURCES += [ - "builtin/intl/Collator.cpp", - "builtin/intl/CommonFunctions.cpp", - "builtin/intl/DateTimeFormat.cpp", - "builtin/intl/DisplayNames.cpp", - "builtin/intl/DurationFormat.cpp", - "builtin/intl/GlobalIntlData.cpp", - "builtin/intl/IntlObject.cpp", - "builtin/intl/LanguageTag.cpp", - "builtin/intl/ListFormat.cpp", - "builtin/intl/Locale.cpp", - "builtin/intl/NumberFormat.cpp", - "builtin/intl/PluralRules.cpp", - "builtin/intl/RelativeTimeFormat.cpp", - "builtin/intl/Segmenter.cpp", - "builtin/intl/SharedIntlData.cpp", - ] - if CONFIG["MOZ_INSTRUMENTS"]: OS_LIBS += ["-framework CoreFoundation"] SOURCES += [ @@ -567,7 +548,7 @@ DIRS += [ ] if CONFIG["JS_HAS_INTL_API"]: - DIRS += ["builtin/temporal"] + DIRS += ["builtin/intl", "builtin/temporal"] # Bug 1739321 - clang 13+ only emits debuginfo for classes that are actually # constructed, and we cheat in a number of cases. The flag exists at least