gecko-dev/modules/libpref/moz.build

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

175 строки
3.7 KiB
Plaintext
Исходник Обычный вид История

# -*- 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/.
with Files("**"):
BUG_COMPONENT = ("Core", "Preferences: Backend")
if CONFIG["ENABLE_TESTS"]:
DIRS += ["test/gtest"]
XPCSHELL_TESTS_MANIFESTS += [
"test/unit/xpcshell.ini",
"test/unit_ipc/xpcshell.ini",
]
Bug 1047877 - Flatten modules/libpref/{public,src}/ directories. r=bsmedberg --HG-- rename : modules/libpref/src/Makefile.in => modules/libpref/Makefile.in rename : modules/libpref/src/Preferences.cpp => modules/libpref/Preferences.cpp rename : modules/libpref/public/Preferences.h => modules/libpref/Preferences.h rename : modules/libpref/src/init/all.js => modules/libpref/init/all.js rename : modules/libpref/public/nsIPrefBranch.idl => modules/libpref/nsIPrefBranch.idl rename : modules/libpref/public/nsIPrefBranch2.idl => modules/libpref/nsIPrefBranch2.idl rename : modules/libpref/public/nsIPrefBranchInternal.idl => modules/libpref/nsIPrefBranchInternal.idl rename : modules/libpref/public/nsIPrefLocalizedString.idl => modules/libpref/nsIPrefLocalizedString.idl rename : modules/libpref/public/nsIPrefService.idl => modules/libpref/nsIPrefService.idl rename : modules/libpref/public/nsIRelativeFilePref.idl => modules/libpref/nsIRelativeFilePref.idl rename : modules/libpref/src/nsPrefBranch.cpp => modules/libpref/nsPrefBranch.cpp rename : modules/libpref/src/nsPrefBranch.h => modules/libpref/nsPrefBranch.h rename : modules/libpref/src/nsPrefsFactory.cpp => modules/libpref/nsPrefsFactory.cpp rename : modules/libpref/src/prefapi.cpp => modules/libpref/prefapi.cpp rename : modules/libpref/src/prefapi.h => modules/libpref/prefapi.h rename : modules/libpref/src/prefapi_private_data.h => modules/libpref/prefapi_private_data.h rename : modules/libpref/src/prefread.cpp => modules/libpref/prefread.cpp rename : modules/libpref/src/prefread.h => modules/libpref/prefread.h
2014-08-08 08:52:04 +04:00
XPIDL_SOURCES += [
"nsIPrefBranch.idl",
"nsIPrefLocalizedString.idl",
"nsIPrefService.idl",
"nsIRelativeFilePref.idl",
]
XPIDL_MODULE = "pref"
pref_groups = [
"accessibility",
"alerts",
"apz",
"beacon",
"bidi",
"browser",
"canvas",
"channelclassifier",
"clipboard",
"content",
"converter",
"datareporting",
"device",
"devtools",
"docshell",
"dom",
"editor",
"extensions",
"findbar",
"fission",
"font",
"full_screen_api",
"general",
"geo",
"gfx",
"gl",
"html5",
"idle_period",
"image",
"intl",
"javascript",
"layers",
"layout",
"mathml",
"media",
"mousewheel",
"network",
"nglayout",
"page_load",
"permissions",
"plain_text",
"plugin",
"plugins",
"preferences",
"print",
"privacy",
"prompts",
"security",
"signon",
"slider",
Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi mozStorage used to read prefs on service init, because they could only be read on the main-thread. When service init was moved earlier, it started trying to read prefs too early, before the profile was set up, thus it ended up always reading the default value. This patch moves the only relevant pref to mirrored StaticPrefs that can be accessed from different threads, and removes two preferences that apparently are not necessary (they have been broken from a long time) for now. In particular, providing a global synchronous setting is a footgun, each consumer should decide about their synchronous needs, rather than abusing a dangerous "go fast" setting. The page size is something we don't change from quite some time, and it's unlikely to be used to run experiments in the wild before doing local measurements first, for which Try builds are enough. The remaining exclusiveLock pref is a bit controversial, because in general exclusive lock is better for various reasons, and mostly it is necessary to use WAL on network shares. Though developers may find it useful for debugging, and some third parties are doing dangerous things (like copying over databases) to work around it, for which it's safer to provide a less dangerous alternative. Note exclusive lock only works on Unix-derived systems for now (no Windows implementation). Finally, this introduces a fallback to exclusive lock, so that if a third party is using our databases, so that we can't get an exclusive lock, we'll fallback to normal locking. Differential Revision: https://phabricator.services.mozilla.com/D82717
2020-07-11 00:45:53 +03:00
"storage",
"svg",
"telemetry",
"test",
"threads",
"timer",
"toolkit",
"ui",
"urlclassifier",
"view_source",
"webgl",
"widget",
"xul",
"zoom",
]
if CONFIG["OS_TARGET"] == "Android":
pref_groups += [
"android",
"consoleservice",
]
if CONFIG["FUZZING"]:
pref_groups += ["fuzzing"]
pref_groups = tuple(sorted(pref_groups))
# Note: generate_static_pref_list.py relies on StaticPrefListAll.h being first.
gen_h = ["init/StaticPrefListAll.h"]
gen_h += ["StaticPrefsAll.h"]
gen_h += ["init/StaticPrefList_{}.h".format(pg) for pg in pref_groups]
gen_h += ["StaticPrefs_{}.h".format(pg) for pg in pref_groups]
gen_cpp = ["init/StaticPrefsCGetters.cpp"]
gen_rs = ["static_prefs.rs"]
Bug 1047877 - Flatten modules/libpref/{public,src}/ directories. r=bsmedberg --HG-- rename : modules/libpref/src/Makefile.in => modules/libpref/Makefile.in rename : modules/libpref/src/Preferences.cpp => modules/libpref/Preferences.cpp rename : modules/libpref/public/Preferences.h => modules/libpref/Preferences.h rename : modules/libpref/src/init/all.js => modules/libpref/init/all.js rename : modules/libpref/public/nsIPrefBranch.idl => modules/libpref/nsIPrefBranch.idl rename : modules/libpref/public/nsIPrefBranch2.idl => modules/libpref/nsIPrefBranch2.idl rename : modules/libpref/public/nsIPrefBranchInternal.idl => modules/libpref/nsIPrefBranchInternal.idl rename : modules/libpref/public/nsIPrefLocalizedString.idl => modules/libpref/nsIPrefLocalizedString.idl rename : modules/libpref/public/nsIPrefService.idl => modules/libpref/nsIPrefService.idl rename : modules/libpref/public/nsIRelativeFilePref.idl => modules/libpref/nsIRelativeFilePref.idl rename : modules/libpref/src/nsPrefBranch.cpp => modules/libpref/nsPrefBranch.cpp rename : modules/libpref/src/nsPrefBranch.h => modules/libpref/nsPrefBranch.h rename : modules/libpref/src/nsPrefsFactory.cpp => modules/libpref/nsPrefsFactory.cpp rename : modules/libpref/src/prefapi.cpp => modules/libpref/prefapi.cpp rename : modules/libpref/src/prefapi.h => modules/libpref/prefapi.h rename : modules/libpref/src/prefapi_private_data.h => modules/libpref/prefapi_private_data.h rename : modules/libpref/src/prefread.cpp => modules/libpref/prefread.cpp rename : modules/libpref/src/prefread.h => modules/libpref/prefread.h
2014-08-08 08:52:04 +04:00
EXPORTS.mozilla += [
"init/StaticPrefListBegin.h",
"init/StaticPrefListEnd.h",
"nsRelativeFilePref.h",
Bug 1047877 - Flatten modules/libpref/{public,src}/ directories. r=bsmedberg --HG-- rename : modules/libpref/src/Makefile.in => modules/libpref/Makefile.in rename : modules/libpref/src/Preferences.cpp => modules/libpref/Preferences.cpp rename : modules/libpref/public/Preferences.h => modules/libpref/Preferences.h rename : modules/libpref/src/init/all.js => modules/libpref/init/all.js rename : modules/libpref/public/nsIPrefBranch.idl => modules/libpref/nsIPrefBranch.idl rename : modules/libpref/public/nsIPrefBranch2.idl => modules/libpref/nsIPrefBranch2.idl rename : modules/libpref/public/nsIPrefBranchInternal.idl => modules/libpref/nsIPrefBranchInternal.idl rename : modules/libpref/public/nsIPrefLocalizedString.idl => modules/libpref/nsIPrefLocalizedString.idl rename : modules/libpref/public/nsIPrefService.idl => modules/libpref/nsIPrefService.idl rename : modules/libpref/public/nsIRelativeFilePref.idl => modules/libpref/nsIRelativeFilePref.idl rename : modules/libpref/src/nsPrefBranch.cpp => modules/libpref/nsPrefBranch.cpp rename : modules/libpref/src/nsPrefBranch.h => modules/libpref/nsPrefBranch.h rename : modules/libpref/src/nsPrefsFactory.cpp => modules/libpref/nsPrefsFactory.cpp rename : modules/libpref/src/prefapi.cpp => modules/libpref/prefapi.cpp rename : modules/libpref/src/prefapi.h => modules/libpref/prefapi.h rename : modules/libpref/src/prefapi_private_data.h => modules/libpref/prefapi_private_data.h rename : modules/libpref/src/prefread.cpp => modules/libpref/prefread.cpp rename : modules/libpref/src/prefread.h => modules/libpref/prefread.h
2014-08-08 08:52:04 +04:00
"Preferences.h",
"StaticPrefsBase.h",
Bug 1047877 - Flatten modules/libpref/{public,src}/ directories. r=bsmedberg --HG-- rename : modules/libpref/src/Makefile.in => modules/libpref/Makefile.in rename : modules/libpref/src/Preferences.cpp => modules/libpref/Preferences.cpp rename : modules/libpref/public/Preferences.h => modules/libpref/Preferences.h rename : modules/libpref/src/init/all.js => modules/libpref/init/all.js rename : modules/libpref/public/nsIPrefBranch.idl => modules/libpref/nsIPrefBranch.idl rename : modules/libpref/public/nsIPrefBranch2.idl => modules/libpref/nsIPrefBranch2.idl rename : modules/libpref/public/nsIPrefBranchInternal.idl => modules/libpref/nsIPrefBranchInternal.idl rename : modules/libpref/public/nsIPrefLocalizedString.idl => modules/libpref/nsIPrefLocalizedString.idl rename : modules/libpref/public/nsIPrefService.idl => modules/libpref/nsIPrefService.idl rename : modules/libpref/public/nsIRelativeFilePref.idl => modules/libpref/nsIRelativeFilePref.idl rename : modules/libpref/src/nsPrefBranch.cpp => modules/libpref/nsPrefBranch.cpp rename : modules/libpref/src/nsPrefBranch.h => modules/libpref/nsPrefBranch.h rename : modules/libpref/src/nsPrefsFactory.cpp => modules/libpref/nsPrefsFactory.cpp rename : modules/libpref/src/prefapi.cpp => modules/libpref/prefapi.cpp rename : modules/libpref/src/prefapi.h => modules/libpref/prefapi.h rename : modules/libpref/src/prefapi_private_data.h => modules/libpref/prefapi_private_data.h rename : modules/libpref/src/prefread.cpp => modules/libpref/prefread.cpp rename : modules/libpref/src/prefread.h => modules/libpref/prefread.h
2014-08-08 08:52:04 +04:00
]
EXPORTS.mozilla += sorted(["!" + g for g in gen_h])
UNIFIED_SOURCES += [
"Preferences.cpp",
"SharedPrefMap.cpp",
]
gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
Bug 1047877 - Flatten modules/libpref/{public,src}/ directories. r=bsmedberg --HG-- rename : modules/libpref/src/Makefile.in => modules/libpref/Makefile.in rename : modules/libpref/src/Preferences.cpp => modules/libpref/Preferences.cpp rename : modules/libpref/public/Preferences.h => modules/libpref/Preferences.h rename : modules/libpref/src/init/all.js => modules/libpref/init/all.js rename : modules/libpref/public/nsIPrefBranch.idl => modules/libpref/nsIPrefBranch.idl rename : modules/libpref/public/nsIPrefBranch2.idl => modules/libpref/nsIPrefBranch2.idl rename : modules/libpref/public/nsIPrefBranchInternal.idl => modules/libpref/nsIPrefBranchInternal.idl rename : modules/libpref/public/nsIPrefLocalizedString.idl => modules/libpref/nsIPrefLocalizedString.idl rename : modules/libpref/public/nsIPrefService.idl => modules/libpref/nsIPrefService.idl rename : modules/libpref/public/nsIRelativeFilePref.idl => modules/libpref/nsIRelativeFilePref.idl rename : modules/libpref/src/nsPrefBranch.cpp => modules/libpref/nsPrefBranch.cpp rename : modules/libpref/src/nsPrefBranch.h => modules/libpref/nsPrefBranch.h rename : modules/libpref/src/nsPrefsFactory.cpp => modules/libpref/nsPrefsFactory.cpp rename : modules/libpref/src/prefapi.cpp => modules/libpref/prefapi.cpp rename : modules/libpref/src/prefapi.h => modules/libpref/prefapi.h rename : modules/libpref/src/prefapi_private_data.h => modules/libpref/prefapi_private_data.h rename : modules/libpref/src/prefread.cpp => modules/libpref/prefread.cpp rename : modules/libpref/src/prefread.h => modules/libpref/prefread.h
2014-08-08 08:52:04 +04:00
GeneratedFile(
*gen_all_tuple,
script="init/generate_static_pref_list.py",
entry_point="emit_code",
inputs=["init/StaticPrefList.yaml"]
)
PYTHON_UNITTEST_MANIFESTS += [
"test/python.ini",
]
XPCOM_MANIFESTS += [
"components.conf",
]
SPHINX_TREES["/modules/libpref"] = "docs"
Bug 1047877 - Flatten modules/libpref/{public,src}/ directories. r=bsmedberg --HG-- rename : modules/libpref/src/Makefile.in => modules/libpref/Makefile.in rename : modules/libpref/src/Preferences.cpp => modules/libpref/Preferences.cpp rename : modules/libpref/public/Preferences.h => modules/libpref/Preferences.h rename : modules/libpref/src/init/all.js => modules/libpref/init/all.js rename : modules/libpref/public/nsIPrefBranch.idl => modules/libpref/nsIPrefBranch.idl rename : modules/libpref/public/nsIPrefBranch2.idl => modules/libpref/nsIPrefBranch2.idl rename : modules/libpref/public/nsIPrefBranchInternal.idl => modules/libpref/nsIPrefBranchInternal.idl rename : modules/libpref/public/nsIPrefLocalizedString.idl => modules/libpref/nsIPrefLocalizedString.idl rename : modules/libpref/public/nsIPrefService.idl => modules/libpref/nsIPrefService.idl rename : modules/libpref/public/nsIRelativeFilePref.idl => modules/libpref/nsIRelativeFilePref.idl rename : modules/libpref/src/nsPrefBranch.cpp => modules/libpref/nsPrefBranch.cpp rename : modules/libpref/src/nsPrefBranch.h => modules/libpref/nsPrefBranch.h rename : modules/libpref/src/nsPrefsFactory.cpp => modules/libpref/nsPrefsFactory.cpp rename : modules/libpref/src/prefapi.cpp => modules/libpref/prefapi.cpp rename : modules/libpref/src/prefapi.h => modules/libpref/prefapi.h rename : modules/libpref/src/prefapi_private_data.h => modules/libpref/prefapi_private_data.h rename : modules/libpref/src/prefread.cpp => modules/libpref/prefread.cpp rename : modules/libpref/src/prefread.h => modules/libpref/prefread.h
2014-08-08 08:52:04 +04:00
include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
DEFINES["OS_ARCH"] = CONFIG["OS_ARCH"]
DEFINES["MOZ_WIDGET_TOOLKIT"] = CONFIG["MOZ_WIDGET_TOOLKIT"]
if CONFIG["MOZ_SERVICES_SYNC"]:
DEFINES["MOZ_SERVICES_SYNC"] = True
if CONFIG["MOZ_BUILD_APP"] == "browser":
DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [
"greprefs.js",
]
else:
for arch in CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
FINAL_TARGET_FILES[arch] += [
"!/dist/fat-aar/output/{arch}/greprefs.js".format(arch=arch),
]
else:
FINAL_TARGET_PP_FILES += [
"greprefs.js",
]
if CONFIG["MOZ_BACKGROUNDTASKS"]:
DEFINES["MOZ_BACKGROUNDTASKS"] = True