[vlc-commits] [Git][videolan/vlc][master] 13 commits: modules: common.am: remove trailing characters

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Wed Sep 15 19:03:58 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
dd6fa610 by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
modules: common.am: remove trailing characters

- - - - -
505f0955 by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
demux: avformat: remove -read_only_relocs

This is not supported with -bundle_bitcode, and was only supposed to be
used on 32bit anyway. It seems to be only a legacy flag now.

>From ld64 man:

     -read_only_relocs treatment
                 Enables the use of relocations which will cause dyld to
                 modify (copy-on-write) read-only pages.  The compiler
                 will normally never generate such code.

- - - - -
7c4ee7ec by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
securetransport: use __builtin_available tagging

The SSL*ALPNProtocols were introduced in recent OS version, and dynamic
lookup (using ld64 option -Wl,-U) was used to make it work during
link-time and potentially not have the function available.

However, -Wl,-U is not compatible with bitcode support, whereas
availability targeting is, and availability targeting provides more
information about when it's not supported.

MacOSX 10.13.4 is the minimal version target in cURL too. The
SSL*ALPNProtocols functions are documented as supported since 10.13 but
they were not included in the initial 10.13 releases.

- - - - -
ceeb44fb by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
misc: remove -Wl,-U flags for SecureTransport

Those flags are not supported with bitcode and are not needed now that
the code has migrated to using availability targeting.

- - - - -
c7bdf947 by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
video_output: Makefile.am: use CPPFLAGS for defines

- - - - -
3a7eccda by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
glinterop_cvpx: add frameworks on tvOS

Otherwise, the OpenGL interop doesn't link on tvOS when creating dynamic
plugins (--enable-shared option from build.sh).

- - - - -
22709120 by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
video_output: Makefile.am: reorganize glinterop_cvpx

 - use a single location for adding every defines
 - use a single vout_LTLIBRARIES += line
 - deduplicate -framework,IOSurface

- - - - -
64bd2e6b by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
video_output: use libvlc_vtutils convenience library

- - - - -
9262bbc2 by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
configure.ac: remove -framework,AppKit

Those frameworks only exist for MacOSX, so it was invalid to set them up
in the general case. Fortunately, it wasn't really used on iOS and tvOS
for the executables so it didn't have consequences.

On MacOSX, the targets needing this framework already link it so it is
not needed.

- - - - -
7e916f4c by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
configure.ac: add linker test for dynamic_lookup

Check that the linker features from Darwin ld64 for marking a symbol as
undefined (in the context of two-level namespace, it means that it can
be looked up in other namespaces) are usable. If they are not, the
static module bank is disabled since it depends on either static linkage
(which is obviously not affected by this option) or more generally the
ability to look up the static module bank symbol in a different linkage
unit/namespace.

In particular, they are currently not usable when enabling bitcode
through LDFLAGS+=" -fembed-bitcode" and compiling dynamically. On tvOS,
bitcode is mandatory, so supporting compiling with bitcode but without
the static module bank seems a rather good compromise given that it was
disabled anyway previously.

In static builds (the current shipping target for iOS and tvOS), the
static module bank stays enabled by the !HAVE_DYNAMIC_PLUGINS check.

- - - - -
95bbad6d by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
extras/tools: libtool: fix support for bitcode

When building with bitcode enabled (*FLAGS+=-fembed-bitcode), the
following happens:

 - with LDFLAGS += -fembed-bitcode, the vanilla libtool version will
   remove the -fembed-bitcode flag, being an unknown flag, so bitcode
   won't actually be enabled, and final link steps might complain that
   the dylibs (libvlccore.dylib for instance) doesn't actually have
   bitcode embedded.

 - once fixed (either by this patch or by using -Wl,-fembed-bitcode),
   the plugins will be compiled with -module, which default to using
   MH_BUNDLE on iOS/tvOS/MacOSX instead of MH_DYLIB. Indeed, dylibs can
   be dlopened only since MacOSX 10.3/10.4, and can be dlclosed only
   since MacOSX 10.5, so MH_BUNDLE was the primary target for libtool
   module support. However, MH_BUNDLE is not compatible with the bitcode
   support from Clang.

Since we support MacOSX 10.11 as minimum, we can default to using
MH_DYLIB for plugins to have the bitcode support.

This new libtool patch add the explicit support for -fembed-bitcode in
libtool --mode=link flags, and change the flags used when using -module
in libtool to switch to dylibs.

- - - - -
26231ecf by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
apple: build.sh: add bitcode flag to LDFLAGS too

The bitcode flag was already added to CFLAGS, but was only used when
creating a static build of libvlc, which doesn't involve linkage. When
creating shared plugins, the dylibs must be linked with the
-fembed-bitcode flag to gather the bitcode from the different objects.

In particular, bitcode is mandatory on tvOS, so this is mandatory when
building dynamic plugins and/or libvlc for tvOS.

- - - - -
585c0b02 by Alexandre Janniaux at 2021-09-15T17:06:27+00:00
apple: build.sh: add support for -fembed-bitcode-marker

- - - - -


11 changed files:

- configure.ac
- extras/package/apple/build.sh
- + extras/tools/libtool-2.4.6-embed-bitcode.patch
- extras/tools/tools.mak
- modules/common.am
- modules/demux/Makefile.am
- modules/misc/Makefile.am
- modules/misc/securetransport.c
- modules/video_output/Makefile.am
- src/Makefile.am
- src/modules/bank.c


Changes:

=====================================
configure.ac
=====================================
@@ -205,9 +205,26 @@ case "${host_os}" in
     AX_APPEND_FLAG([-Werror=partial-availability], [OBJCFLAGS])
     AX_APPEND_FLAG([-Wl,-headerpad_max_install_names], [LDFLAGS])
 
-    VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
     VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation])
 
+    dnl This is not supported when bitcode is enabled. In that case, we need
+    dnl to disable the static bank loader.
+    AC_MSG_CHECKING([if -Wl,-U is allowed])
+    VLC_SAVE_FLAGS
+    AX_APPEND_FLAG([LDFLAGS],[-Wl,-U,_my_array -no-undefined])
+    AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM([], [dnl
+__attribute__((visibility("default"))) extern int my_array[];
+__attribute__((visibility("default"))) int foo() { return my_array[0]; }
+])],
+       [
+        VLC_ADD_LDFLAGS([libvlccore],[-Wl,-U,_vlc_static_modules])
+        VLC_ADD_LDFLAGS([libvlc vlc],[-Wl,-undefined,dynamic_lookup])
+        VLC_ADD_CPPFLAGS([libvlccore],[-DHAVE_DYLIB_DYNAMIC_LOOKUP=1])
+        AC_MSG_RESULT([yes])
+       ],[AC_MSG_RESULT([no])])
+    VLC_RESTORE_FLAGS
+
     AC_EGREP_CPP(yes,
             [#import <TargetConditionals.h>
              #if TARGET_OS_IPHONE


=====================================
extras/package/apple/build.sh
=====================================
@@ -98,6 +98,7 @@ VLC_REQUESTED_CORE_COUNT=0
 VLC_DISABLE_DEBUG=0
 # whether to compile with bitcode or not
 VLC_USE_BITCODE=0
+VLC_BITCODE_FLAG="-fembed-bitcode"
 # whether to build static or dynamic plugins
 VLC_BUILD_DYNAMIC=0
 
@@ -123,7 +124,8 @@ usage()
     echo " --arch=ARCH      Architecture to build for"
     echo "                   (i386|x86_64|armv7|arm64)"
     echo " --sdk=SDK        Name of the SDK to build with (see 'xcodebuild -showsdks')"
-    echo " --enable-bitcode Enable bitcode for compilation"
+    echo " --enable-bitcode        Enable bitcode for compilation, same as with =full"
+    echo " --enable-bitcode=marker Enable bitcode marker for compilation"
     echo " --disable-debug  Disable libvlc debug mode (for release)"
     echo " --verbose        Print verbose output and disable multi-core use"
     echo " --help           Print this help"
@@ -316,8 +318,10 @@ set_host_envvars()
 {
     # Flags to be used for C-like compilers (C, C++, Obj-C)
     local clike_flags="$VLC_DEPLOYMENT_TARGET_CFLAG -arch $VLC_HOST_ARCH -isysroot $VLC_APPLE_SDK_PATH $1"
+    local bitcode_flag=""
     if [ "$VLC_USE_BITCODE" -gt "0" ]; then
-        clike_flags+=" -fembed-bitcode"
+        clike_flags+=" $VLC_BITCODE_FLAG"
+        bitcode_flag=" $VLC_BTICODE_FLAG"
     fi
 
     export CPPFLAGS="-arch $VLC_HOST_ARCH -isysroot $VLC_APPLE_SDK_PATH"
@@ -327,7 +331,7 @@ set_host_envvars()
     export OBJCFLAGS="$clike_flags"
 
     # Vanilla clang doesn't use VLC_DEPLOYMENT_TAGET_LDFLAGS but only the CFLAGS variant
-    export LDFLAGS="$VLC_DEPLOYMENT_TARGET_LDFLAG $VLC_DEPLOYMENT_TARGET_CFLAG -arch $VLC_HOST_ARCH"
+    export LDFLAGS="$VLC_DEPLOYMENT_TARGET_LDFLAG $VLC_DEPLOYMENT_TARGET_CFLAG -arch $VLC_HOST_ARCH ${bitcode_flag}"
 }
 
 hostenv()
@@ -362,6 +366,7 @@ write_config_mak()
     # Flags to be used for C-like compilers (C, C++, Obj-C)
     local clike_flags="$VLC_DEPLOYMENT_TARGET_CFLAG -arch $VLC_HOST_ARCH -isysroot $VLC_APPLE_SDK_PATH $1"
     if [ "$VLC_USE_BITCODE" -gt "0" ]; then
+        # We use bitcode for contribs in every case, no dylib or executable built from them
         clike_flags+=" -fembed-bitcode"
     fi
 
@@ -451,8 +456,12 @@ do
         --disable-debug)
             VLC_DISABLE_DEBUG=1
             ;;
-        --enable-bitcode)
+        --enable-bitcode|--enable-bitcode=full)
+            VLC_USE_BITCODE=1
+            ;;
+        --enable-bitcode=marker)
             VLC_USE_BITCODE=1
+            VLC_BITCODE_FLAG="-fembed-bitcode-marker"
             ;;
         --arch=*)
             VLC_HOST_ARCH="${1#--arch=}"


=====================================
extras/tools/libtool-2.4.6-embed-bitcode.patch
=====================================
@@ -0,0 +1,46 @@
+From 23f7d7c98d923bd454c114ea7dfa6ded9ef49bbe Mon Sep 17 00:00:00 2001
+From: Alexandre Janniaux <ajanni at videolabs.io>
+Date: Mon, 31 May 2021 10:28:54 +0200
+Subject: [PATCH] ltmain: add support for -fembed-bitcode
+
+---
+ build-aux/ltmain.in | 8 ++++++++
+ m4/libtool.m4       | 4 ++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 96b37003..0d9f10a0 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5173,6 +5173,13 @@ func_mode_link ()
+ 	prev=xcompiler
+ 	continue
+ 	;;
++      -fembed-bitcode|-fembed-bitcode-marker)
++	func_append compiler_flags " $arg"
++	func_append compile_command " $arg"
++	func_append finalize_command " $arg"
++	func_append linker_flags " $arg"
++        continue
++        ;;
+
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+       |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index f2d1f398..e5891815 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1125,9 +1125,9 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
+   if test yes = "$_lt_dar_can_shared"; then
+     output_verbose_link_cmd=func_echo_all
+     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
++    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -dynamiclib \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
++    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -dynamiclib \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+     m4_if([$1], [CXX],
+ [   if test yes != "$lt_cv_apple_cc_single_mod"; then
+       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+--
+2.31.1


=====================================
extras/tools/tools.mak
=====================================
@@ -117,6 +117,7 @@ libtool: libtool-$(LIBTOOL_VERSION).tar.gz
 	$(APPLY) $(TOOLS)/libtool-2.4.6-clang-libs.patch
 	$(APPLY) $(TOOLS)/libtool-2.4.6-response-files.patch
 	$(APPLY) $(TOOLS)/libtool-2.4.6-lpthread.patch
+	$(APPLY) $(TOOLS)/libtool-2.4.6-embed-bitcode.patch
 	$(MOVE)
 
 .buildlibtool: libtool .automake .help2man


=====================================
modules/common.am
=====================================
@@ -32,7 +32,7 @@ AM_LDFLAGS = \
 	-export-symbols-regex ^vlc_entry \
 	-shrext $(LIBEXT) \
 	-no-undefined \
-	$(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE) 
+	$(top_builddir)/compat/libcompat.la $(LTLIBVLCCORE)
 if HAVE_WIN32
 AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo -Wc,-static
 endif


=====================================
modules/demux/Makefile.am
=====================================
@@ -154,9 +154,6 @@ libavformat_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(SYMBOLIC_LDFLAGS)
 if HAVE_ZLIB
 libavformat_plugin_la_LIBADD += -lz
 endif
-if HAVE_DARWIN
-libavformat_plugin_la_LDFLAGS += -Wl,-read_only_relocs,suppress
-endif
 if HAVE_AVFORMAT
 if !MERGE_FFMPEG
 demux_LTLIBRARIES += libavformat_plugin.la


=====================================
modules/misc/Makefile.am
=====================================
@@ -42,7 +42,6 @@ libsecuretransport_plugin_la_SOURCES = misc/securetransport.c
 libsecuretransport_plugin_la_CFLAGS = $(AM_CFLAGS) $(SECURETRANSPORT_CFLAGS)
 libsecuretransport_plugin_la_LIBADD = $(SECURETRANSPORT_LIBS)
 libsecuretransport_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(miscdir)' -Wl,-framework,Security,-framework,CoreFoundation
-libsecuretransport_plugin_la_LDFLAGS += -Wl,-U,_SSLCopyALPNProtocols,-U,_SSLSetALPNProtocols
 misc_LTLIBRARIES += libsecuretransport_plugin.la
 endif
 


=====================================
modules/misc/securetransport.c
=====================================
@@ -441,12 +441,11 @@ static int st_Handshake (vlc_tls_t *session,
     (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED  >= 110000) || \
     (TARGET_OS_TV     && __TV_OS_VERSION_MAX_ALLOWED      >= 110000) || \
     (TARGET_OS_WATCH  && __WATCH_OS_VERSION_MAX_ALLOWED   >= 40000)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
 
     /* Handle ALPN data */
     if (alp != NULL) {
-        if (SSLCopyALPNProtocols != NULL) {
+        if (__builtin_available(iOS 11, macOS 10.13.4, tvOS 11, watchOS 4, *))
+        {
             CFArrayRef alpnArray = NULL;
             OSStatus res = SSLCopyALPNProtocols(sys->p_context, &alpnArray);
             if (res == noErr && alpnArray) {
@@ -462,7 +461,6 @@ static int st_Handshake (vlc_tls_t *session,
         }
     }
 
-#pragma clang diagnostic pop
 #else
 
     /* No ALPN support */
@@ -745,12 +743,11 @@ static vlc_tls_t *st_ClientSessionOpen(vlc_tls_client_t *crd, vlc_tls_t *sock,
     (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED  >= 110000) || \
     (TARGET_OS_TV     && __TV_OS_VERSION_MAX_ALLOWED      >= 110000) || \
     (TARGET_OS_WATCH  && __WATCH_OS_VERSION_MAX_ALLOWED   >= 40000)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
 
     /* Handle ALPN */
     if (alpn != NULL) {
-        if (SSLSetALPNProtocols != NULL) {
+        if (__builtin_available(iOS 11, macOS 10.13.4, tvOS 11, watchOS 4, *))
+        {
             CFMutableArrayRef alpnValues = alpnToCFArray(alpn);
 
             if (alpnValues == NULL) {
@@ -768,7 +765,6 @@ static vlc_tls_t *st_ClientSessionOpen(vlc_tls_client_t *crd, vlc_tls_t *sock,
         }
     }
 
-#pragma clang diagnostic pop
 #else
 
     /* No ALPN support */


=====================================
modules/video_output/Makefile.am
=====================================
@@ -28,14 +28,25 @@ endif
 
 libglinterop_cvpx_plugin_la_SOURCES = video_output/opengl/interop_cvpx.m \
 	video_output/opengl/interop.h
-libglinterop_cvpx_plugin_la_SOURCES += codec/vt_utils.c codec/vt_utils.h
+libglinterop_cvpx_plugin_la_LIBADD = libvlc_vtutils.la
 libglinterop_cvpx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' \
-	-Wl,-framework,Foundation,-framework,CoreVideo
+	-Wl,-framework,Foundation,-framework,CoreVideo,-framework,IOSurface
+libglinterop_cvpx_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
+if HAVE_DARWIN
+if HAVE_OSX
+libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,OpenGL
+else
+libglinterop_cvpx_plugin_la_CPPFLAGS += -DUSE_OPENGL_ES2
+libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,OpenGLES
+endif
+vout_LTLIBRARIES += libglinterop_cvpx_plugin.la
+endif
+
 
 if HAVE_OSX
 libvout_macosx_plugin_la_SOURCES = video_output/macosx.m \
 	$(OPENGL_VOUT_COMMONSOURCES)
-libvout_macosx_plugin_la_CFLAGS = $(AM_CFLAGS) -DHAVE_GL_CORE_SYMBOLS
+libvout_macosx_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAVE_GL_CORE_SYMBOLS
 libvout_macosx_plugin_la_LIBADD = libvlc_opengl.la
 libvout_macosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' \
 	-Wl,-framework,OpenGL,-framework,Cocoa
@@ -47,13 +58,7 @@ libcaopengllayer_plugin_la_LIBADD = libvlc_opengl.la
 libcaopengllayer_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)' \
 	-Wl,-framework,OpenGL,-framework,Cocoa,-framework,QuartzCore
 
-libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,IOSurface,-framework,OpenGL
-vout_LTLIBRARIES += libvout_macosx_plugin.la libcaopengllayer_plugin.la \
-	libglinterop_cvpx_plugin.la
-endif
-if HAVE_IOS
-libglinterop_cvpx_plugin_la_CFLAGS = $(AM_CFLAGS) -DUSE_OPENGL_ES2
-libglinterop_cvpx_plugin_la_LDFLAGS += -Wl,-framework,IOSurface,-framework,OpenGLES
+vout_LTLIBRARIES += libvout_macosx_plugin.la libcaopengllayer_plugin.la
 endif
 
 libvout_ios_plugin_la_SOURCES = video_output/opengl/display.c
@@ -72,14 +77,12 @@ libcaeagl_ios_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
 
 if HAVE_IOS
 vout_LTLIBRARIES += libvout_ios_plugin.la \
-	libglinterop_cvpx_plugin.la \
 	libuiview_window_plugin.la \
 	libcaeagl_ios_plugin.la
 endif
 if HAVE_TVOS
 vout_LTLIBRARIES += \
 	libvout_ios_plugin.la \
-	libglinterop_cvpx_plugin.la \
 	libuiview_window_plugin.la \
 	libcaeagl_ios_plugin.la
 endif


=====================================
src/Makefile.am
=====================================
@@ -566,7 +566,7 @@ $(libvlccore_la_OBJECTS): libvlccore_objc.la
 libvlccore_objc_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
 libvlccore_objc_la_LDFLAGS = -static
 libvlccore_la_LIBADD += libvlccore_objc.la
-libvlccore_la_LDFLAGS +=  -Wl,-framework,Foundation -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib -Wl,-U,_vlc_static_modules
+libvlccore_la_LDFLAGS +=  -Wl,-framework,Foundation -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib
 endif
 
 # iOS and tvOS applications cannot install global shared libraries and


=====================================
src/modules/bank.c
=====================================
@@ -179,7 +179,9 @@ static vlc_plugin_t *module_InitStatic(vlc_plugin_cb entry)
  * not provided at runtime. However, although __MACH__ implies the same runtime
  * consequences for weak linking, it will still require the definition to exist
  * at build time. To workaround this, we add -Wl,-U,vlc_static_modules. */
-#if defined(__ELF__) || defined(__MACH__) || !HAVE_DYNAMIC_PLUGINS
+#if defined(__ELF__) \
+    || (defined(__MACH__) && defined(HAVE_DYLIB_DYNAMIC_LOOKUP)) \
+    || !HAVE_DYNAMIC_PLUGINS
 VLC_WEAK
 extern vlc_plugin_cb vlc_static_modules[];
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/20bc495f72df6ee14f445c492aa0452968008f50...585c0b02e1ba0d99c484a21189d0e335c4cf90b2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/20bc495f72df6ee14f445c492aa0452968008f50...585c0b02e1ba0d99c484a21189d0e335c4cf90b2
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list