Hendrik Leppkes <[email protected]> writes:

> This allows building with Microsofts version of ar
> by specifying --ar='c99wrap lib.exe' during configure.
> ---
>  configure   |   11 +++++++++++
>  library.mak |    2 +-
>  2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 7c377aa..876659d 100755
> --- a/configure
> +++ b/configure
> @@ -1807,6 +1807,7 @@ enable static
>  enable swscale_alpha
>  
>  # build settings
> +ARFLAGS='rc'
>  SHFLAGS='-shared -Wl,-soname,$$(@F)'
>  AVSERVERLDFLAGS=-Wl,-E
>  LIBPREF="lib"
> @@ -1826,6 +1827,7 @@ asflags_filter=echo
>  cflags_filter=echo
>  ldflags_filter=echo
>  
> +AR_O='$@'
>  AS_C='-c'
>  AS_O='-o $@'
>  CC_C='-c'
> @@ -2204,6 +2206,7 @@ probe_cc(){
>      unset _type _ident _cc_c _cc_e _cc_o _flags _cflags
>      unset _ld_o _ldflags _ld_lib _ld_path
>      unset _depflags _DEPCMD _DEPFLAGS
> +    unset _arflags _ar_o
>      _flags_filter=echo
>  
>      if $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
> @@ -2334,6 +2337,8 @@ probe_cc(){
>          if [ $pfx = hostcc ]; then
>              append _cflags -Dsnprintf=_snprintf
>          fi
> +        _ar_o='-out $@'
> +        _arflags='-nologo'
>      fi
>  
>      eval ${pfx}_type=\$_type
> @@ -2382,6 +2387,10 @@ asflags_filter=$_flags_filter
>  add_asflags $_flags $_cflags
>  set_ccvars AS
>  
> +probe_cc ar "$ar"
> +ARFLAGS=${_arflags-$ARFLAGS}
> +AR_O=${_ar_o-$AR_O}

This is a bit weird.  The probe_cc function is meant to be used with
commands that invoke the compiler driver (gcc etc) in some manner.  The
'ar' command does not fit this category.

What is the advantage of using lib.exe instead of ar anyway?

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to