Hi Michal,

I was indeed referring to building libpocl.a and not the LLVM static-link
option. But regarding the latter though, I never thought about the LLVM
headers and other dependencies. Thanks for pointing this out to me! I
thought that the linking with LLVM statically would create a self-contained
binary, but if there are still dependencies such as LLVM headers for the
compilation of OpenCL kernels then I have to re-think my approach and
forget about the static linking of LLVM. In this case it will have to be
installed on the target machine system-wide no matter what; I can live with
that since it is quite standard. Having it as a pre-requisite is still much
better than asking for people to install and mess with Intel's or AMD's
binary OpenCL runtime.

The only problem with not being able to control LLVM's version and using
the system one is that it probably undermines my previous idea of
pre-compiling the *.bc kernel files one one machine and shipping it with my
application, since I'm not expecting them to be compatible across different
LLVM versions. But perhaps I can pre-compile the *.bc files for each major
LLVM version (assuming that the code is binary compatible between LLVM's
minor versions). I have to think about that since it is becoming more
complicated that I thought. Perhaps going for one of Pekka's suggestions
would be really the best idea (although I'm really not sure if I will have
the required time or knowledge to implement it - I'm really not familiar
with the code and would require a lot of time to get familiar with it I
guess).

Cheers,
Tiago



On Wed, Apr 22, 2015 at 1:47 PM, Michal Babej <[email protected]>
wrote:

> Hi,
>
> On Wed, 22 Apr 2015 00:58:01 +0200
> Tiago Gehring <[email protected]> wrote:
>
> > One unrelated question: the cmake build does not seem to support the
> > generation of the static libs, am I'm missing something or is this
> > really not yet supported?
> >
> It does support linking with static llvm / clang libraries. If you're
> asking if it supports generating static libpocl or libOpenCL, you're
> correct, the answer is no.
>
> The static-llvm option in pocl's CMake is to support folks who built
> LLVM using CMake, which does not build libLLVM.so by default, unlike
> autotools built LLVM.
>
> The main reason static libpocl is not supported, is that nobody cared
> enough to make it work :)
>
> Personally, i think that the entire "static libs" business is a bit
> dangerous, especially in case of LLVM. It gives people the false
> impression that a statically built lib is independent. In the case of
> LLVM, there is potentially a ton of header files which the compilation
> process might depend on. So if you move the static built lib to a
> clean machine and try to compile something, it might blow up on
> missing LLVM headers. I've bumped into a bug like this once (not with
> pocl though).
>
> So it could work for you and whatever OpenCL programs you're trying to
> use, but IMO for pocl to try and support this officialy, is a bit
> dangerous road to take. Then again perhaps Pekka / Kalle will disagree,
> and they know LLVM better than me.
>
> Cheers,
> -- mb
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> pocl-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pocl-devel
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to