[vlc-commits] [Git][videolan/vlc][master] 2 commits: package/win32: add the -l in the EXTRA_CRUNTIME string

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Feb 22 07:04:59 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9178cfcd by Steve Lhomme at 2023-02-22T06:46:57+00:00
package/win32: add the -l in the EXTRA_CRUNTIME string

So we don't have to repeat it each time

- - - - -
e6cf68a5 by Steve Lhomme at 2023-02-22T06:46:57+00:00
package/win32: don't force ucrt linking with C/C++ file

We already check that the C toolchain defaults to UCRT since 23fac2466a6284f1b341d3f87e3fa9f336d87c7e.
Using -lucrt with recent cland creates a warning.
arrib25 is compiled with -Werror which prevents it from compiling. But we don't
need -lucrt at all.

- - - - -


1 changed file:

- extras/package/win32/build.sh


Changes:

=====================================
extras/package/win32/build.sh
=====================================
@@ -263,20 +263,19 @@ if [ ! -z "$BUILD_UCRT" ]; then
         CFLAGS="$CFLAGS -Wl,-lwindowsapp,-lwindowsappcompat"
         CXXFLAGS="$CXXFLAGS -Wl,-lwindowsapp,-lwindowsappcompat"
         CPPFLAGS="$CPPFLAGS -DWINSTORECOMPAT"
-        EXTRA_CRUNTIME="vcruntime140_app"
+        EXTRA_CRUNTIME="-lvcruntime140_app"
     else
         SHORTARCH="$SHORTARCH-ucrt"
-        # this library doesn't exist yet, so use ucrt twice as a placeholder
-        # EXTRA_CRUNTIME="vcruntime140"
-        EXTRA_CRUNTIME="ucrt"
+        # this library doesn't exist yet
+        # EXTRA_CRUNTIME="-lvcruntime140"
     fi
 
-    LDFLAGS="$LDFLAGS -l$EXTRA_CRUNTIME -lucrt"
+    LDFLAGS="$LDFLAGS $EXTRA_CRUNTIME -lucrt"
     if [ ! "$COMPILING_WITH_CLANG" -gt 0 ]; then
         # assume gcc
         NEWSPECFILE="`pwd`/specfile-$SHORTARCH"
         # tell gcc to replace msvcrt with ucrtbase+ucrt
-        $CC -dumpspecs | sed -e "s/-lmsvcrt/-l$EXTRA_CRUNTIME -lucrt/" > $NEWSPECFILE
+        $CC -dumpspecs | sed -e "s/-lmsvcrt/$EXTRA_CRUNTIME -lucrt/" > $NEWSPECFILE
         CFLAGS="$CFLAGS -specs=$NEWSPECFILE"
         CXXFLAGS="$CXXFLAGS -specs=$NEWSPECFILE"
 
@@ -288,8 +287,10 @@ if [ ! -z "$BUILD_UCRT" ]; then
             sed -i -e "s/-lkernel32//" $NEWSPECFILE
         fi
     else
-        CFLAGS="$CFLAGS -Wl,-l$EXTRA_CRUNTIME,-lucrt"
-        CXXFLAGS="$CXXFLAGS -Wl,-l$EXTRA_CRUNTIME,-lucrt"
+        if [ -n "$EXTRA_CRUNTIME" ]; then
+            CFLAGS="$CFLAGS -Wl,$EXTRA_CRUNTIME"
+            CXXFLAGS="$CXXFLAGS -Wl,$EXTRA_CRUNTIME"
+        fi
     fi
 
     # the values are not passed to the makefiles/configures



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/013a1e4a7f197041d1ce2b11f4f871eb0a28f596...e6cf68a5326d3e91fec81623b726b6104a803dbc

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/013a1e4a7f197041d1ce2b11f4f871eb0a28f596...e6cf68a5326d3e91fec81623b726b6104a803dbc
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