Bug 1949346 - Default Gecko shared libraries to no linkage. r=firefox-build-system-reviewers,sergesanspaille
Back in the old days, shared libraries that linked against libxul/xpcom were common (binary components), but those days are long gone. Even when GeckoSharedLibrary was added, most uses were linkage=None. Nowadays, all of them are, it's time to admit that this should be the default. Differential Revision: https://phabricator.services.mozilla.com/D238899
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
GeckoSharedLibrary("AccessibleMarshal", linkage=None)
|
GeckoSharedLibrary("AccessibleMarshal")
|
||||||
|
|
||||||
# Missing here, is the notion that changes to the idl files included by
|
# Missing here, is the notion that changes to the idl files included by
|
||||||
# ISimpleDOM.idl (e.g. ISimpleDOMNode.idl) should rebuild the outputs.
|
# ISimpleDOM.idl (e.g. ISimpleDOMNode.idl) should rebuild the outputs.
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ def GeckoSharedLibrary(name, output_category=None, **kwargs):
|
|||||||
SharedLibrary(name, output_category)
|
SharedLibrary(name, output_category)
|
||||||
|
|
||||||
kwargs.setdefault("mozglue", "library")
|
kwargs.setdefault("mozglue", "library")
|
||||||
|
kwargs.setdefault("linkage", None)
|
||||||
|
|
||||||
GeckoBinary(**kwargs)
|
GeckoBinary(**kwargs)
|
||||||
|
|
||||||
|
|||||||
2
config/external/gkcodecs/moz.build
vendored
2
config/external/gkcodecs/moz.build
vendored
@@ -11,7 +11,7 @@
|
|||||||
# both from libxul (when decoding using the codec integration layer Gecko
|
# both from libxul (when decoding using the codec integration layer Gecko
|
||||||
# provides) and from ffmpeg (when decoding and encoding through ffmpeg).
|
# provides) and from ffmpeg (when decoding and encoding through ffmpeg).
|
||||||
|
|
||||||
GeckoSharedLibrary("gkcodecs", linkage=None)
|
GeckoSharedLibrary("gkcodecs")
|
||||||
SHARED_LIBRARY_NAME = "gkcodecs"
|
SHARED_LIBRARY_NAME = "gkcodecs"
|
||||||
SYMBOLS_FILE = "gkcodecs.symbols"
|
SYMBOLS_FILE = "gkcodecs.symbols"
|
||||||
if CONFIG["MOZ_SYSTEM_LIBVPX"]:
|
if CONFIG["MOZ_SYSTEM_LIBVPX"]:
|
||||||
|
|||||||
2
config/external/lgpllibs/moz.build
vendored
2
config/external/lgpllibs/moz.build
vendored
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# Any library added here should also be reflected in the about:license page.
|
# Any library added here should also be reflected in the about:license page.
|
||||||
|
|
||||||
GeckoSharedLibrary("lgpllibs", linkage=None)
|
GeckoSharedLibrary("lgpllibs")
|
||||||
SHARED_LIBRARY_NAME = "lgpllibs"
|
SHARED_LIBRARY_NAME = "lgpllibs"
|
||||||
|
|
||||||
# For some reason, mingw builds export way too many symbols.
|
# For some reason, mingw builds export way too many symbols.
|
||||||
|
|||||||
@@ -206,4 +206,4 @@ OS_LIBS += [
|
|||||||
|
|
||||||
DEFFILE = "../../checkout/src/libEGL/libEGL_autogen.def"
|
DEFFILE = "../../checkout/src/libEGL/libEGL_autogen.def"
|
||||||
RCFILE = "../../checkout/src/libEGL/libEGL.rc"
|
RCFILE = "../../checkout/src/libEGL/libEGL.rc"
|
||||||
GeckoSharedLibrary("libEGL", linkage=None)
|
GeckoSharedLibrary("libEGL")
|
||||||
|
|||||||
@@ -425,4 +425,4 @@ OS_LIBS += [
|
|||||||
|
|
||||||
DEFFILE = "../../checkout/src/libGLESv2/libGLESv2_autogen.def"
|
DEFFILE = "../../checkout/src/libGLESv2/libGLESv2_autogen.def"
|
||||||
RCFILE = "../../checkout/src/libGLESv2/libGLESv2.rc"
|
RCFILE = "../../checkout/src/libGLESv2/libGLESv2.rc"
|
||||||
GeckoSharedLibrary("libGLESv2", linkage=None)
|
GeckoSharedLibrary("libGLESv2")
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ def export_target(target_full_name) -> Set[str]:
|
|||||||
|
|
||||||
lib_type = desc["type"]
|
lib_type = desc["type"]
|
||||||
if lib_type == "shared_library":
|
if lib_type == "shared_library":
|
||||||
lines.append(f'GeckoSharedLibrary("{name}", linkage=None)')
|
lines.append(f'GeckoSharedLibrary("{name}")')
|
||||||
elif lib_type == "static_library":
|
elif lib_type == "static_library":
|
||||||
lines.append(f'Library("{name}")')
|
lines.append(f'Library("{name}")')
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ LIBRARY_DEFINES["MOZ_SUPPORT_LEAKCHECKING"] = True
|
|||||||
# JS shell would like to link to the static library.
|
# JS shell would like to link to the static library.
|
||||||
|
|
||||||
if CONFIG["JS_SHARED_LIBRARY"]:
|
if CONFIG["JS_SHARED_LIBRARY"]:
|
||||||
GeckoSharedLibrary("js", linkage=None)
|
GeckoSharedLibrary("js")
|
||||||
SHARED_LIBRARY_NAME = CONFIG["JS_LIBRARY_NAME"]
|
SHARED_LIBRARY_NAME = CONFIG["JS_LIBRARY_NAME"]
|
||||||
|
|
||||||
# Ensure symbol versions of shared library on Linux do not conflict
|
# Ensure symbol versions of shared library on Linux do not conflict
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
with Files("**"):
|
with Files("**"):
|
||||||
BUG_COMPONENT = ("Core", "Audio/Video: GMP")
|
BUG_COMPONENT = ("Core", "Audio/Video: GMP")
|
||||||
|
|
||||||
GeckoSharedLibrary("clearkey", linkage=None)
|
GeckoSharedLibrary("clearkey")
|
||||||
|
|
||||||
FINAL_TARGET = "dist/bin/gmp-clearkey/0.1"
|
FINAL_TARGET = "dist/bin/gmp-clearkey/0.1"
|
||||||
|
|
||||||
|
|||||||
@@ -40,4 +40,4 @@ if CONFIG["CC_TYPE"] == "clang-cl":
|
|||||||
"-Wunused-result",
|
"-Wunused-result",
|
||||||
]
|
]
|
||||||
|
|
||||||
GeckoSharedLibrary("wmfclearkey", linkage=None)
|
GeckoSharedLibrary("wmfclearkey")
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ if CONFIG["MOZ_SYSTEM_NSS"]:
|
|||||||
|
|
||||||
include("/build/gyp_base.mozbuild")
|
include("/build/gyp_base.mozbuild")
|
||||||
if CONFIG["MOZ_FOLD_LIBS"]:
|
if CONFIG["MOZ_FOLD_LIBS"]:
|
||||||
GeckoSharedLibrary("nss", linkage=None)
|
GeckoSharedLibrary("nss")
|
||||||
# TODO: The library name can be changed when bug 845217 is fixed.
|
# TODO: The library name can be changed when bug 845217 is fixed.
|
||||||
SHARED_LIBRARY_NAME = "nss3"
|
SHARED_LIBRARY_NAME = "nss3"
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ def Libxul(name, output_category=None):
|
|||||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"):
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"):
|
||||||
# This is going to be a framework named "XUL", not an ordinary library named
|
# This is going to be a framework named "XUL", not an ordinary library named
|
||||||
# "libxul.dylib"
|
# "libxul.dylib"
|
||||||
GeckoFramework(name, output_category=output_category, linkage=None)
|
GeckoFramework(name, output_category=output_category)
|
||||||
SHARED_LIBRARY_NAME = "XUL"
|
SHARED_LIBRARY_NAME = "XUL"
|
||||||
else:
|
else:
|
||||||
GeckoSharedLibrary(name, output_category=output_category, linkage=None)
|
GeckoSharedLibrary(name, output_category=output_category)
|
||||||
SHARED_LIBRARY_NAME = "xul"
|
SHARED_LIBRARY_NAME = "xul"
|
||||||
|
|
||||||
DELAYLOAD_DLLS += [
|
DELAYLOAD_DLLS += [
|
||||||
|
|||||||
Reference in New Issue
Block a user