[x264-devel] [PATCH] build: Generate dependency information as a side-effect of compilation
Janne Grunau
janne-x264 at jannau.net
Wed May 7 11:51:23 CEST 2014
On 2014-05-07 11:24:55 +0200, Diego Biurrun wrote:
> On Sun, May 04, 2014 at 09:50:35PM +0200, Janne Grunau wrote:
> > On 2014-05-03 16:30:31 +0200, Diego Biurrun wrote:
> > > This allows updating dependency information each time a file is changed,
> > > instead of creating dependency information once at the first build. In the
> > > latter case, dependency information is not updated each time a file is
> > > changed so that it can get out of date quickly.
> > > ---
> > >
> > > This could still use some testing on ARM and ICL.
> >
> > Works as expected for C sources on ARM, no change for assembler files.
> > Adding 'ASFLAGS="$ASFLAGS -MMD"' to the non MACOSX ARM section generates
> > dependency files as expected. The same doesn't work for darwin/macosx on arm
> > due to gas-preprocessor.
>
> Why does it conflict with gas-preprocessor?
It doesn't conflict, it just doesn't work.
gas-preprocessor reads the source file and feeds the preprocessed code via
stdin to the assembler. At least with apple clang -MMD this results in
writing the dependencies cleverly into '-.d'. There seems to be an issue
with -MT too since it uses '-' as target. That could might be a bug in
gas-preprocessor though, will check now.
> > > .gitignore | 2 +-
> > > Makefile | 27 +++++++++++----------------
> > > configure | 8 ++------
> > > 3 files changed, 14 insertions(+), 23 deletions(-)
> >
> > the change looks ok, I can't judge whether it's worth it. What is causing
> > the slowdown? I'd guess including many small files in the Makefile and
> > writing them during compilation. How large is the slowdown?
>
> This patch iteration adds a separate step to generate dependencies for .asm
> files. That causes a slowdown because the assembly files are processed
> twice. In my local latest revision I have dropped that. NASM supports
> generating dependencies as a side-effect of assembling, I'll check if
> that also works with YASM.
YASM seems to support only '-M' and doesn't assemble when it is used
> > A full build is slightly faster on linux (cross-compiling with gcc for arm).
> > make in a fully build tree (i.e. only dependency checking) is 2-3 times
> > slower but still takes less then 0.1s with hot fs caches.
>
> Does not sound like a relevant quantity to me.
to me neither but there operation systems and file systems with less
optimized caches.
Janne
More information about the x264-devel
mailing list