[vlc-commits] [Git][videolan/vlc][master] 2 commits: package/win32: build all C++ with the static (LLVM) runtime

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 7 10:16:25 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
90488d35 by Steve Lhomme at 2024-11-07T09:33:05+00:00
package/win32: build all C++ with the static (LLVM) runtime

Otherwise it may use the dynamic libunwind (as found in meson).

Don't emit errors if it's not using (when only compiling). Some contribs don't like that.

- - - - -
5755ff89 by Steve Lhomme at 2024-11-07T09:33:05+00:00
package/win32: fix indentation

After 7e2b8ecd0aa4999bb43a47465bd890e6d601d11e.
No functional changes.

- - - - -


1 changed file:

- extras/package/win32/build.sh


Changes:

=====================================
extras/package/win32/build.sh
=====================================
@@ -361,6 +361,9 @@ if [ "$COMPILING_WITH_CLANG" -gt 0 ]; then
     VLC_AR="$TRIPLET-ar"
     # avoid using gcc-ranlib with the clang toolchain, if both are installed
     VLC_RANLIB="$TRIPLET-ranlib"
+    # force linking with the static C++ runtime of LLVM
+    VLC_LDFLAGS="$VLC_LDFLAGS --start-no-unused-arguments -Wl,-l:libunwind.a -static-libstdc++ --end-no-unused-arguments"
+    VLC_CXXFLAGS="$VLC_CXXFLAGS --start-no-unused-arguments -Wl,-l:libunwind.a --end-no-unused-arguments"
 fi
 
 if [ -z "$PKG_CONFIG" ]; then
@@ -533,7 +536,7 @@ if [ -n "$BUILD_MESON" ]; then
     info "Configuring VLC"
     cd ${VLC_ROOT_PATH}
     meson setup ${BUILD_PATH}/$SHORTARCH-meson \
-        -Dc_args="${VLC_CFLAGS}" -Dc_link_args="${VLC_LDFLAGS}" -Dcpp_args="${VLC_CXXFLAGS}" -Dcpp_link_args="${VLC_LDFLAGS} -static-libstdc++" \
+        -Dc_args="${VLC_CFLAGS}" -Dc_link_args="${VLC_LDFLAGS}" -Dcpp_args="${VLC_CXXFLAGS}" -Dcpp_link_args="${VLC_LDFLAGS}" \
         -Dcmake_prefix_path="${BUILD_PATH}/contrib/$CONTRIB_PREFIX" \
         $MCONFIGFLAGS \
         --cross-file ${BUILD_PATH}/$SHORTARCH-meson/crossfile.meson \
@@ -543,55 +546,55 @@ if [ -n "$BUILD_MESON" ]; then
     cd ${BUILD_PATH}/$SHORTARCH-meson
     meson compile -j $JOBS
 else
-info "Bootstrapping"
-${VLC_ROOT_PATH}/bootstrap
+    info "Bootstrapping"
+    ${VLC_ROOT_PATH}/bootstrap
 
-mkdir -p $SHORTARCH
-cd $SHORTARCH
+    mkdir -p $SHORTARCH
+    cd $SHORTARCH
 
-# set environment that will be kept in config.status
-if [ -n "$VLC_CPPFLAGS" ]; then
-    export CPPFLAGS="$VLC_CPPFLAGS"
-fi
-if [ -n "$VLC_CFLAGS" ]; then
-    export CFLAGS="$VLC_CFLAGS"
-fi
-if [ -n "$VLC_CXXFLAGS" ]; then
-    export CXXFLAGS="$VLC_CXXFLAGS"
-fi
-if [ -n "$VLC_LDFLAGS" ]; then
-    export LDFLAGS="$VLC_LDFLAGS"
-fi
-if [ -n "$VLC_AR" ]; then
-    export AR="$VLC_AR"
-fi
-if [ -n "$VLC_RANLIB" ]; then
-    export RANLIB="$VLC_RANLIB"
-fi
-if [ -n "$VLC_PKG_CONFIG" ]; then
-    export PKG_CONFIG="$VLC_PKG_CONFIG"
-fi
-if [ -n "$VLC_PKG_CONFIG_LIBDIR" ]; then
-    export PKG_CONFIG_LIBDIR="$VLC_PKG_CONFIG_LIBDIR"
-fi
-
-info "Configuring VLC"
-${SCRIPT_PATH}/configure.sh --host=$TRIPLET --with-contrib=../contrib/$CONTRIB_PREFIX "$WIXPATH" $CONFIGFLAGS
+    # set environment that will be kept in config.status
+    if [ -n "$VLC_CPPFLAGS" ]; then
+        export CPPFLAGS="$VLC_CPPFLAGS"
+    fi
+    if [ -n "$VLC_CFLAGS" ]; then
+        export CFLAGS="$VLC_CFLAGS"
+    fi
+    if [ -n "$VLC_CXXFLAGS" ]; then
+        export CXXFLAGS="$VLC_CXXFLAGS"
+    fi
+    if [ -n "$VLC_LDFLAGS" ]; then
+        export LDFLAGS="$VLC_LDFLAGS"
+    fi
+    if [ -n "$VLC_AR" ]; then
+        export AR="$VLC_AR"
+    fi
+    if [ -n "$VLC_RANLIB" ]; then
+        export RANLIB="$VLC_RANLIB"
+    fi
+    if [ -n "$VLC_PKG_CONFIG" ]; then
+        export PKG_CONFIG="$VLC_PKG_CONFIG"
+    fi
+    if [ -n "$VLC_PKG_CONFIG_LIBDIR" ]; then
+        export PKG_CONFIG_LIBDIR="$VLC_PKG_CONFIG_LIBDIR"
+    fi
 
-info "Compiling"
-make -j$JOBS
+    info "Configuring VLC"
+    ${SCRIPT_PATH}/configure.sh --host=$TRIPLET --with-contrib=../contrib/$CONTRIB_PREFIX "$WIXPATH" $CONFIGFLAGS
 
-if [ "$INSTALLER" = "n" ]; then
-make package-win32-debug-7zip
-make -j$JOBS package-win32 package-msi
-elif [ "$INSTALLER" = "r" ]; then
-make package-win32
-elif [ "$INSTALLER" = "u" ]; then
-make package-win32-release
-sha512sum vlc-*-release.7z
-elif [ "$INSTALLER" = "m" ]; then
-make package-msi
-elif [ ! -z "$INSTALL_PATH" ]; then
-make package-win-common
-fi
+    info "Compiling"
+    make -j$JOBS
+
+    if [ "$INSTALLER" = "n" ]; then
+        make package-win32-debug-7zip
+        make -j$JOBS package-win32 package-msi
+    elif [ "$INSTALLER" = "r" ]; then
+        make package-win32
+    elif [ "$INSTALLER" = "u" ]; then
+        make package-win32-release
+        sha512sum vlc-*-release.7z
+    elif [ "$INSTALLER" = "m" ]; then
+        make package-msi
+    elif [ ! -z "$INSTALL_PATH" ]; then
+        make package-win-common
+    fi
 fi



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5b38cfe032287242b25522bdde65366b6903452c...5755ff89bc3b73d7e0847c362d47f82ab56fc5ff

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5b38cfe032287242b25522bdde65366b6903452c...5755ff89bc3b73d7e0847c362d47f82ab56fc5ff
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list