[FFmpeg-devel] [PATCH 1/2] ffbuild: compose linker response files in a loop

Gyan Doshi ffmpeg at gyani.pro
Wed Mar 26 16:12:13 EET 2025



On 2025-03-25 05:11 pm, Ramiro Polla wrote:
> Hi,
>
> On Sat, Mar 22, 2025 at 5:33 AM Gyan Doshi <ffmpeg at gyani.pro> wrote:
>> On 2025-03-22 03:29 am, Martin Storsjö wrote:
>>> On Fri, 21 Mar 2025, Gyan Doshi wrote:
>>>> ffbuild/library.mak | 7 +++++--
>>>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/ffbuild/library.mak b/ffbuild/library.mak
>>>> index 7e1871b74c..15302852ec 100644
>>>> --- a/ffbuild/library.mak
>>>> +++ b/ffbuild/library.mak
>>>> @@ -36,7 +36,8 @@ endif
>>>> $(SUBDIR)$(LIBNAME): $(OBJS) $(STLIBOBJS)
>>>>      $(RM) $@
>>>> ifeq ($(AR_OBJS),true)
>>>> -    $(Q)echo $^ > $@.objs
>>>> +    -$(RM) $@.objs
>>>> +    $(Q)$(foreach ARG,$^,echo -n "$(ARG) " >> $@.objs;)
>>> Does this instance even work, it looks broken, like it is missing
>>> something?
>> Tested both static and shared building. All working with no noticeable
>> speed difference although I didn't formally bench.
> It's generally a good idea to check for and report the speed
> differences. Even if just for the sake of curiosity.

So, with this configure:

   --disable-doc --disable-w32threads --enable-pthreads 
--disable-autodetect --cc="ccache gcc" --enable-static --enable-shared 
--extra-ldflags="-static" --enable-gpl --enable-version3

I ran one priming run + 5 repeat runs of    `time make -j4`.

Before, real ranged from 2m10.188s to 2m12.154s
After, real ranged from 2m12.486s to 2m13.405s

I also ran one priming run + 5 repeat runs of    `time make -j4 
libavcodec/libavcodec.a libavcodec/avcodec.dll`.

Before, real ranged from 1m34.232s to 1m42.721s
After, real ranged from 1m32.360s to 1m39.484s

Regards,
Gyan



More information about the ffmpeg-devel mailing list