diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn --- a/build/config/mac/BUILD.gn +++ b/build/config/mac/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/mac/mac_sdk.gni") import("//build/config/sysroot.gni") import("//build/toolchain/rbe.gni") import("//build/toolchain/siso.gni") +import("//third_party/ffmpeg/ffmpeg_options.gni") # This is included by reference in the //build/config/compiler config that # is applied to all targets. It is here to separate out the logic. @@ -87,6 +88,10 @@ config("mac_dynamic_flags") { get_label_info(":mac_dynamic_flags", "root_out_dir"), root_build_dir) ] } + } else if (is_component_ffmpeg) { + # Satel Lite (#158): FFmpeg is a library of its own in a static build; + # tools such as v8_context_snapshot_generator load it from beside them. + ldflags += [ "-Wl,-rpath,@loader_path/." ] } } diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//third_party/ffmpeg/ffmpeg_options.gni") import("//build/config/chrome_build.gni") import("//build/config/chromeos/args.gni") import("//build/config/compiler/compiler.gni") @@ -1174,6 +1175,17 @@ if (is_win) { public_deps = [ "//ui/gl:swiftshader_vk_library_copy" ] } + # Satel Lite (#158, 2026-12-01): FFmpeg as its own library (LGPL: a user + # can put their own build of it in place), in the framework's Libraries + # next to the other dylibs; the framework finds it through its rpath. + if (is_component_ffmpeg && !is_component_build) { + bundle_data("satel_lite_ffmpeg_library") { + sources = [ "$root_out_dir/libffmpeg.dylib" ] + outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ] + public_deps = [ "//third_party/ffmpeg" ] + } + } + bundle_data("vulkan_loader_binaries") { sources = [ "$root_out_dir/vulkan_intermediates/libvulkan.dylib" ] outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ] @@ -1408,6 +1420,9 @@ if (is_win) { } bundle_deps += [ ":vulkan_loader_binaries" ] + if (is_component_ffmpeg && !is_component_build) { + bundle_deps += [ ":satel_lite_ffmpeg_library" ] + } if (enable_separate_renderer_binary) { bundle_deps += [ ":chrome_renderer_library" ] @@ -1429,6 +1444,10 @@ if (is_win) { # Specify a sensible install_name for static builds. The library is # dlopen()ed so this is not used to resolve the module. ldflags += [ "-Wl,-install_name,@executable_path/../Frameworks/$chrome_framework_name.framework/Versions/$chrome_framework_version/$chrome_framework_name" ] + if (is_component_ffmpeg) { + # Satel Lite (#158): @rpath/libffmpeg.dylib from Libraries. + ldflags += [ "-Wl,-rpath,@loader_path/Libraries" ] + } } else { # In the component build, both the :chrome_app and various # :chrome_helper* targets directly link to the Framework target. Use