harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salikh Zakirov <Salikh.Zaki...@Intel.com>
Subject Re: [drlvm][build]Stale object files are linked to DRLVM
Date Fri, 06 Oct 2006 13:12:37 GMT
Salikh Zakirov wrote:
>> Currently DRLVM build system suffers from a deficiency,
>> which gets in the way quickly if you experiment a lot with patches.
>> If you apply a patch that creates a new file, and build DRLVM, and
>> then unapply the patch, and rebuild again,
>> the stale .obj file will still get linked to the executable.
>> Usually, this leads to the spurios linker errors.
>> Can anyone with Ant/DRLVM build system experience propose a solution?

I've spent some time reading Ant manual in all conceivable directions,
trying to make ant remove stale .obj files, i.e. .obj files
that do not have corresponding .cpp file anymore.
The only thing I could come up with was something like

      <fileset dir="." includes="*.obj">
          <present targetdir="vm/vmcore/src" present="both">
            <mapper type="glob" from="*.obj" to="*.cpp"/>
          <present targetdir="vm/vmcore/src/class_support" present="both">
            <mapper type="glob" from="*.obj" to="*.cpp"/>

To make this operation clean up stale.obj files, one would
need to list all directories, where .cpp files come from. And there exist .c and .asm files
So, it looks vastly impractical.

Too bad Ant doesn't allow to make operations with filesets, like add, subtract,
intersect, map, etc.

There always is an option to make a custom Ant task, e.g.
for creating a new fileset from existing filesets and a mapper,
or for subtracting filesets, but I would not go that way
until I know for sure there is no others.

Dreaming for a moment, if the following construct was possible in Ant,

    <fileset id="sources> ... </fileset>

    <fileset id="objects">
        <transform filesetref="sources">
                 <globmapper from="*.cpp" to="${objdir}/*.obj"/>

then the original problem would have been solved by using this "objects" fileset in the link

Geir replied:
> make?

I know you are teasing (^_-) 
I can easily propose a couple of ways to use make
for building DRLVM (i.e. running C++ compiler and linker). The last thing I played
with was using shell-script for generating Makefiles using the source file list.

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message