Hi,
I just committed some changes to configure and the bytecode2llvm.cpp to
allow building with an external LLVM.
This will allow you to build against LLVM 2.8 when it is released
(right now you can test with LLVM 2.8 rc2).
It won't work if you try linking against LLVM 2.7 for obvious reasons
(upstream's 2.7 doesn't have our patches).
How to use it:
./configure --enable-llvm --with-system-llvm=/path/to/llvm-config
What it does:
Skip building internal LLVM, link against external LLVM *statically*.
So LLVM will stay a build-time only dependency, and upgrading the
LLVM .so won't suddenly break ClamAV
Let me know if this is enough to create packages for your distribution
that links to system's LLVM, or if any other changes are needed.
For example on Debian:
./configure --enable-llvm
--with-system-llvm=/usr/lib/llvm-snapshot/bin/llvm-config
(it should be /usr/bin/llvm-config-2.8 once its packaged)
What I tested:
- building with upstream LLVM 2.8 rc2 on amd64, Release and
Release+Asserts build
- building against llvm2.8rc2 Debian package (updated manually [*])
[*] Since there is no llvm 2.8 rc2 package in Debian, and the -snapshot
is too old, I did this to build an up-to-date llvm 2.8 rc2 package the
same way the snapshot was built:
apt-get source llvm-snapshot
export
LLVMURL=http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28/rc2/
svn co $LLVMURL llvm2.8rc2
cd llvm2.8rc2
zcat ../llvm-snapshot_20100418-1.diff.gz |patch -p1
rm debian/patches/0013-Fix-mips-FTBFS.patch
dpkg-buildpackage -us -uc -b -j6
sudo dpkg -i ../llvm-snapshot_20100418-1_amd64.deb
# workaround debian bug #578483
sudo ln -s /usr/lib/llvm-snapshot/ /usr/lib/llvm
Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
I just committed some changes to configure and the bytecode2llvm.cpp to
allow building with an external LLVM.
This will allow you to build against LLVM 2.8 when it is released
(right now you can test with LLVM 2.8 rc2).
It won't work if you try linking against LLVM 2.7 for obvious reasons
(upstream's 2.7 doesn't have our patches).
How to use it:
./configure --enable-llvm --with-system-llvm=/path/to/llvm-config
What it does:
Skip building internal LLVM, link against external LLVM *statically*.
So LLVM will stay a build-time only dependency, and upgrading the
LLVM .so won't suddenly break ClamAV
Let me know if this is enough to create packages for your distribution
that links to system's LLVM, or if any other changes are needed.
For example on Debian:
./configure --enable-llvm
--with-system-llvm=/usr/lib/llvm-snapshot/bin/llvm-config
(it should be /usr/bin/llvm-config-2.8 once its packaged)
What I tested:
- building with upstream LLVM 2.8 rc2 on amd64, Release and
Release+Asserts build
- building against llvm2.8rc2 Debian package (updated manually [*])
[*] Since there is no llvm 2.8 rc2 package in Debian, and the -snapshot
is too old, I did this to build an up-to-date llvm 2.8 rc2 package the
same way the snapshot was built:
apt-get source llvm-snapshot
export
LLVMURL=http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28/rc2/
svn co $LLVMURL llvm2.8rc2
cd llvm2.8rc2
zcat ../llvm-snapshot_20100418-1.diff.gz |patch -p1
rm debian/patches/0013-Fix-mips-FTBFS.patch
dpkg-buildpackage -us -uc -b -j6
sudo dpkg -i ../llvm-snapshot_20100418-1_amd64.deb
# workaround debian bug #578483
sudo ln -s /usr/lib/llvm-snapshot/ /usr/lib/llvm
Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net