The branch, master has been updated
       via  671e54d7151b133c9a7b8f5195628ba7c8e7a448 (commit)
      from  08eda0596779b94e802cbeb6cd7f1b3b8c48873f (commit)


- Log -----------------------------------------------------------------
commit 671e54d7151b133c9a7b8f5195628ba7c8e7a448
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Tue Nov 4 19:06:06 2025 +0100
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Wed Nov 5 13:00:09 2025 +0000

    configure: add -static suffix to internal static libs for test programs
    
    In MSVC builds, object files built for shared or static libraries are
    technically not compatible with each other. That's why building both
    shared and static libraries simultaneously is not allowed in configure.
    This may change in the future once dllimport/dllexport attributes are no
    longer used. Which will be possible on next major bump. The only
    remaining use of dllexport was changed in c6c8063186.
    
    However, for test programs, we still build internal static libraries
    that allow the test programs to access internal symbols.
    
    In commit 8eca3fa619a7fb2190a3d4203e01a0d2661e7f91, I assumed that when
    CONFIG_STATIC=0, we would never build a static library. We actually do
    build one for internal purposes, for the test executables. In that case,
    we only link the tested library statically (using the same object files
    as built for the shared library), the rest of the libraries are still
    linked dynamically.
    
    Such libraries are never installed and are used only for test programs.
    This change adds a -static suffix to these internal libraries to avoid
    name conflicts. In the MSVC world, static libraries and import libraries
    are generally the same thing and share the same naming conventions.
    
    Fixes: 8eca3fa619a7fb2190a3d4203e01a0d2661e7f91
    Signed-off-by: Kacper Michajłow <[email protected]>

diff --git a/configure b/configure
index 1c8aec3045..1d421460f9 100755
--- a/configure
+++ b/configure
@@ -6066,16 +6066,17 @@ case $target_os in
         ;;
     win32|win64)
         disable symver
+        LIBSUF=".lib"
         if enabled shared; then
             # Cannot build both shared and static libs with MSVC or icl.
             disable static
+            LIBSUF="-static.lib"
         fi
         ! enabled small && test_cmd $windres --version && enable gnu_windres
         enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
         add_cppflags -DWIN32_LEAN_AND_MEAN
         shlibdir_default="$bindir_default"
         LIBPREF=""
-        LIBSUF=".lib"
         SLIBPREF=""
         SLIBSUF=".dll"
         SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'

-----------------------------------------------------------------------

Summary of changes:
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to