On Sun, 07 Mar 2010, Szak�ts Viktor wrote:

Hi Viktor,

> Thanks. An adjustment is needed also in hvm.c. I wonder 
> if this public variable could be eliminated completely 
> (without drawbacks that is). It seems the only one remaining 
> in Harbour core.

It's necessary for core code and it's used in different core files
so it cannot be easy done.
BTW public functions use by core code only usually only increase
HVM lib size because they have separate non inlined copy which is
not used by other code.
Fortunately new compilers like GCC4.5 can resolve this problem.
GCC45 supports link time optimization (LTO) with all compile time
switches. It means that Harbour and final application can be compiled
and linked with -flto and all optimization flags (CFLAGS has to be
passed also to linker as LDFLAGS) and in such case it's possible
to use at link time some additional optimization switches which are
not available for programs using multiple files i.e. we can use
-fwhole-program and eliminate all such dead code.
Final binaries are smaller and faster. We can also reach the same
effect as with HB_HVM_ALL=yes mode without it because the same
optimizations can be done at link time.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to