The branch, master has been updated via 8eca3fa619a7fb2190a3d4203e01a0d2661e7f91 (commit) from b8d5f65b9e89d893f27cf00799dbc15fc0ca2f8e (commit)
- Log ----------------------------------------------------------------- commit 8eca3fa619a7fb2190a3d4203e01a0d2661e7f91 Author: Kacper MichajÅow <kaspe...@gmail.com> AuthorDate: Sun Aug 3 20:59:23 2025 +0200 Commit: James Almer <jamr...@gmail.com> CommitDate: Wed Aug 13 13:17:53 2025 +0000 configure: use proper Windows-style static library naming On Windows, static libraries are typically named with a .lib extension. An exception to this is MinGW targets, which are treated as a distinct target-os. Using Windows-style naming allows `clang` to be used as the linker driver, instead of invoking link or lld-link directly. The latter approach requires manually specifying standard libraries when compiling with `clang` rather than `clang-cl`, and manually specifying standard libraries may be error-prone or incomplete. Using Windows-style naming allows Clang to be used as the linker driver, instead of invoking link or lld-link directly. The latter approach requires manually specifying standard libraries, which may be error-prone or incomplete. This change also improves support for LTO and sanitizer builds, where it's significantly easier to let the compiler driver manage the necessary linker flags. It fixes issues where Clang is asked to link `-lavcodec`, which gets passed to the linker as avcodec.lib, resulting in an error like: lld-link: error: could not open 'avcodec.lib': no such file or directory This happens because `libavcodec.a` was unexpectedly generated, not `avcodec.lib` expected by tooling. Additionally, using `clang` (not `clang-cl`) is simplified, as it does not use autolinking like MSVC/clang-cl does. Now `--ld=clang` can be used to add all the required libraries. Previously, building with `clang` was only possible by using `--ld=lld-link` and manually specifying system dependencies in `extra-ldflags`. Note that those changes doesn't affect mingw build. MSVC builds will produce .lib static libraries now, but the linking process itself is not affected, because filenames are passed directly. To summarize in Windows non-mingw builds: Static builds now produce `lib/avcodec.lib` instead of `lib/libavcodec.a`. Shared builds remain unchanged, producing `bin/avcodec.lib` together with `bin/avcodec-62.dll`. This also removes setting LD_LIB from Win32/64 target as there is one type of .lib in practice. We cannot build both shared and static at the same time as noted by the next line. Signed-off-by: Kacper MichajÅow <kaspe...@gmail.com> diff --git a/configure b/configure index 727c3daea8..416cd2d1d6 100755 --- a/configure +++ b/configure @@ -5157,7 +5157,7 @@ probe_cc(){ _cc_o='-Fo$@' _cc_e='-P' _flags_filter=icl_flags - _ld_lib='lib%.a' + _ld_lib='%.lib' _ld_path='-libpath:' # -Qdiag-error to make icl error when seeing certain unknown arguments _flags='-nologo -Qdiag-error:4044,10157' @@ -5175,7 +5175,7 @@ probe_cc(){ _ident=$($_cc -flavor gnu --version 2>/dev/null) _ld_o='-out:$@' _flags_filter=msvc_flags - _ld_lib='lib%.a' + _ld_lib='%.lib' _ld_path='-libpath:' elif VSLANG=1033 $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then _type=msvc @@ -5205,7 +5205,7 @@ probe_cc(){ fi _cc_o='-Fo$@' _cc_e='-P -Fi$@' - _ld_lib='lib%.a' + _ld_lib='%.lib' _ld_path='-libpath:' _flags='-nologo' disable stripping @@ -5992,9 +5992,6 @@ case $target_os in win32|win64) disable symver if enabled shared; then - # Link to the import library instead of the normal static library - # for shared libs. - LD_LIB='%.lib' # Cannot build both shared and static libs with MSVC or icl. disable static fi @@ -6002,6 +5999,8 @@ case $target_os in 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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) hooks/post-receive --
_______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".