electron/patches/common/ffmpeg/build_gn.patch
2019-02-14 23:57:59 +05:30

24 lines
930 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ales Pergl <alpergl@microsoft.com>
Date: Mon, 22 Oct 2018 10:45:25 -0700
Subject: build_gn.patch
Chromium's Mac toolchain sets the "install_name" linker parameter only
when "is_component_build" is true, but we want to set even if it's false,
because we are making a dylib which will be distributed inside a bundle.
diff --git a/BUILD.gn b/BUILD.gn
index fd79bc4eaba90ab5e8c6df9942dbfaeeebabbc73..1e1859d5aa1567da8a768c870d8a477b052f50ec 100755
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -397,6 +397,10 @@ if (is_component_ffmpeg) {
# So we can append below and assume they're defined.
ldflags = []
+ if (!is_component_build && is_mac) {
+ ldflags += [ "-Wl,-install_name,@rpath/libffmpeg.dylib" ]
+ }
+
if (is_fuchsia || (is_posix && !is_mac)) {
# Fixes warnings PIC relocation when building as component.
ldflags += [