On 02/15/2013 08:27 PM, Jan Steffens wrote:
On Fri, Feb 15, 2013 at 8:16 PM, Sven-Hendrik Haase <sh@xxxxxxxxxxxxx> wrote:
Can't you build them with shared llvm libs?
Nope, we don't have any.
Building LLVM with cmake instead of autotools creates them, but that
approach has other problems.
Actualy, you can.
Archlinux uses llvm-amdgpu-snapshot which is Tom Stellard's snapshot.
In 9.1-devel, --with-llvm-shared-libs is turned on by default if you use
--enable-opencl.
On the other side, LLVM contains a shared library, enabled by
--enable-shared, called libLLVM-<version>.so (ie libLLVM-3.2.so) located
in llvm libdir (/usr/lib/llvm in Archlinux) which contains ALL of static
libraries linked into ONE SHARED library. On the other hand, you can use
CMake and build all of static libraries as shared. The first mentioned
works for me very well. I am not sure what's the condition of that in
Mesa 9.0 world. But 9.1 should be out in no time, so it shouldn't matter.
Note, this is not from Archlinux. I use custom built system with custom
built packages
$ ldd /usr/lib/dri/r600_dri.so
linux-vdso.so.1 (0x00007fffd47ff000)
libllvmradeon9.2.0.so => /usr/lib/libllvmradeon9.2.0.so
(0x00007fd514ba8000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x00007fd5149a0000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007fd514777000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fd51455b000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fd514357000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007fd51414b000)
libdrm_radeon.so.1 => /usr/lib/libdrm_radeon.so.1
(0x00007fd513f41000)
libLLVM-3.2.so => /usr/lib/llvm/libLLVM-3.2.so (0x00007fd51274d000)
$ du -sh /usr/lib/dri/r600_dri.so
5.7M /usr/lib/dri/r600_dri.so
$ du -sh /usr/lib/gallium-pipe/pipe_r600.so
2.4M /usr/lib/gallium-pipe/pipe_r600.so (no
/usr/lib/gbm/pipe_whatever.so anymore, since pipes are shared by gbm and
opencl)
Compared to 20MB Archlinux ones.