This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 61f45bd002 configure: link compiler-rt builtins for __int128 on Clang 
targeting MSVC
61f45bd002 is described below

commit 61f45bd0023a53048d9674835534e17eeddefe75
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Tue Sep 22 23:33:13 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Thu Sep 24 06:39:57 2026 +0000

    configure: link compiler-rt builtins for __int128 on Clang targeting MSVC
    
    Clang targeting MSVC compiles __int128, but nothing links the compiler-rt
    builtins that implement 128-bit division. The clang driver defaults to
    the libgcc runtime, which adds nothing on MSVC, and link.exe or lld-link
    invoked directly do not know the library either. Since b2b37802a9 the
    check therefore fails for these toolchains and libswscale falls back to
    AVInteger.
    
    Ask the driver for the library name and retry the check with it. The
    driver and lld-link search the clang runtime directory on their own, so
    this covers linking through clang as well as calling lld-link directly.
    link.exe only finds the library through LIB, where the copy shipped with
    MSVC is built with cl and lacks the 128-bit routines, so the check keeps
    failing there and nothing changes for such setups.
    
    The library is recorded in int128_extralibs and pulled in by libswscale,
    the only user of av_int128, the same way libatomic is handled.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 2e5263ca12..1ececff721 100755
--- a/configure
+++ b/configure
@@ -4344,7 +4344,7 @@ avutil_suggest="amf clock_gettime ffnvcodec gcrypt libm 
zlib libdrm libmfx openc
 swresample_deps="avutil"
 swresample_suggest="libm libsoxr stdatomic"
 swscale_deps="avutil"
-swscale_suggest="libm stdatomic"
+swscale_suggest="libm stdatomic int128"
 shader_compression_suggest="zlib"
 
 avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs 
liblcevc_dec_extralibs lcms2_extralibs"
@@ -6820,7 +6820,23 @@ fi
 check_builtin atomics_win32 intrin.h "long v = 0; _InterlockedOr(&v, 0)"
 check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"
 check_builtin localtime_r time.h "time_t *time; struct tm *tm; 
localtime_r(time, tm)"
-check_builtin int128 "" "volatile __int128 i128var = 1; i128var /= 100;"
+check_int128(){
+    check_builtin int128 "" "volatile __int128 i128var = 1; i128var /= 100;" 
"$@" &&
+        int128_extralibs="$*"
+}
+
+# Clang targeting MSVC compiles __int128 but does not link the compiler-rt
+# builtins providing the 128-bit division helpers. Ask the driver for the
+# library name and link it explicitly.
+check_int128 ||
+    case "$cc_type" in
+        clang|msvc)
+            rtlib=$($cc $CFLAGS -print-libgcc-file-name --rtlib=compiler-rt 
2>/dev/null)
+            case $rtlib in
+                *.lib) check_int128 -l$(basename "$rtlib" .lib) ;;
+            esac
+        ;;
+    esac
 
 check_builtin float16 "" "_Float16 f16var"
 if enabled float16; then

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to