September 16, 2017
Hi everyone,
I am working on my dynamic compilation PR (https://github.com/ldc-developers/ldc/pull/2293) and I need to link different from main compiler set of LLVM libraries to my jit runtime. But I can't do find_library(LLVM) in runtime cmake because there is already one in top level cmake. I know there are multiple ways to workaround this (and I will probably do this) but proper way to do this will be to move compiler sources to separate directory with own cmakelists and do find_library(LLVM). This will not be an easy task as it was explained in gitter :)
But we can move there incrementally and I created PR to move sources to separate dir with minimal changes in cmake:
https://github.com/ldc-developers/ldc/pull/2332

What do you think?
September 16, 2017
Hi Ivan,

I'm not sure if I understand the motivation for this. runtime/ is already its own CMake project that can be used in a stand-alone fashion (check ldc-build-runtime.d for an example).

Also, why does your JIT runtime need a special LLVM build? This is likely going to create complications for shipping it as part of the default LDC distribution.

Best,
David



On 16 Sep 2017, at 17:57, Ivan Butygin via digitalmars-d-ldc wrote:

> Hi everyone,
> I am working on my dynamic compilation PR (https://github.com/ldc-developers/ldc/pull/2293) and I need to link different from main compiler set of LLVM libraries to my jit runtime. But I can't do find_library(LLVM) in runtime cmake because there is already one in top level cmake. I know there are multiple ways to workaround this (and I will probably do this) but proper way to do this will be to move compiler sources to separate directory with own cmakelists and do find_library(LLVM). This will not be an easy task as it was explained in gitter :)
> But we can move there incrementally and I created PR to move sources to separate dir with minimal changes in cmake:
> https://github.com/ldc-developers/ldc/pull/2332
>
> What do you think?