how to make static hg binary on linux

Vadim Gelfer vadim.gelfer at gmail.com
Fri Mar 3 17:30:46 UTC 2006


i want to see if static hg binary on linux is faster than #!python
version. i wrote little wrapper so that python library and c
extensions can be static linked into one executable.

actual .pyc files are still in filesystem, not compiled in.

result is that static executable makes no help to startup time. i have
not looked to see why.

i have attached hg.c file in case anyone needs it for something. maybe
is faster on other platform like solaris.

here is how to compile:

gcc -O3 -o statichg -I/usr/include/python2.4 hg.c hg/mercurial/*.c \
    -Wl,--export-dynamic -L/usr/lib/python2.4/config -lpython2.4  \
    -lm -lpthread -ldl -lutil

maybe putting .pyc files in uncompressed zip file would help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg.c
Type: text/x-csrc
Size: 392 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20060303/ff30f778/attachment-0001.c>


More information about the Mercurial mailing list