tor-browser

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

commit 7aca2d704e8b05d2df7a19a7767abd39b58494e6
parent 40fc04729c6aeeba36fc6e254e5df96bc5c54d1d
Author: Ryan VanderMeulen <rvandermeulen@mozilla.com>
Date:   Wed,  8 Oct 2025 02:37:46 +0000

Bug 1992910 - Remove unnecessary framework weak links. r=firefox-build-system-reviewers,media-playback-reviewers,glandium,alwu

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

Diffstat:
Mdom/media/platforms/apple/AppleDecoderModule.cpp | 6------
Mdom/media/platforms/moz.build | 2--
Mtoolkit/library/moz.build | 23++++++-----------------
3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/dom/media/platforms/apple/AppleDecoderModule.cpp b/dom/media/platforms/apple/AppleDecoderModule.cpp @@ -24,8 +24,6 @@ extern "C" { // Only exists from MacOS 11 extern void VTRegisterSupplementalVideoDecoderIfAvailable( CMVideoCodecType codecType) __attribute__((weak_import)); -extern Boolean VTIsHardwareDecodeSupported(CMVideoCodecType codecType) - __attribute__((weak_import)); } namespace mozilla { @@ -243,10 +241,6 @@ bool AppleDecoderModule::CanCreateHWDecoder(const MediaCodec& aCodec) { return false; } - if (!VTIsHardwareDecodeSupported) { - return false; - } - if (!VTIsHardwareDecodeSupported(GetCMVideoCodecType(aCodec))) { return false; } diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build @@ -111,8 +111,6 @@ if CONFIG["MOZ_APPLEMEDIA"]: # We want to lazily load _VTRegisterSupplementalVideoDecoderIfAvailable # symbol as it's only available in macOS 11 and later. "-Wl,-U,_VTRegisterSupplementalVideoDecoderIfAvailable", - # Same for VTIsHardwareDecodeSupported available from macOS 10.13. - "-Wl,-U,_VTIsHardwareDecodeSupported", ] include("/ipc/chromium/chromium-config.mozbuild") diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build @@ -89,16 +89,7 @@ def Libxul(name, output_category=None): OS_LIBS += CONFIG["LIBATOMIC_LIBS"] - # TouchBar-related classes are only available in the 10.12.2 SDK and later. - # We need to weak link these classes until we've upgraded our SDK to at - # least 10.12.2. - # We're also linking against libresolv to solve bug 1367932. if CONFIG["OS_ARCH"] == "Darwin": - LDFLAGS += ["-Wl,-U,_OBJC_CLASS_$_NSTouchBar"] - LDFLAGS += ["-Wl,-U,_OBJC_CLASS_$_NSSharingServicePickerTouchBarItem"] - LDFLAGS += ["-Wl,-U,_OBJC_METACLASS_$_NSTouchBar"] - LDFLAGS += ["-Wl,-U,_OBJC_CLASS_$_NSCustomTouchBarItem"] - LDFLAGS += ["-Wl,-U,_OBJC_CLASS_$_NSPopoverTouchBarItem"] LDFLAGS += ["-lresolv"] LDFLAGS += ["-Wl,-rpath,@executable_path/../Frameworks/ChannelPrefs.framework"] @@ -211,6 +202,12 @@ if CONFIG["MOZ_WEBRTC"]: "wininet", ] +if CONFIG["OS_ARCH"] == "Darwin": + OS_LIBS += [ + "-framework MediaPlayer", + "-framework Metal", + ] + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": OS_LIBS += [ "-framework Foundation", @@ -343,14 +340,6 @@ if CONFIG["OS_ARCH"] == "FreeBSD": "util", ] -if CONFIG["OS_ARCH"] == "Darwin": - OS_LIBS += [ - # Link to Metal as required by the Metal gfx-hal backend - "-weak_framework Metal", - "-weak_framework MediaPlayer", - ] - - if CONFIG["OS_ARCH"] == "WINNT": OS_LIBS += [ "shell32",