Support for in-tree build/installs

Hi everyone,

Are there any plans to make the LLVM OpenMP runtime support in-tree builds when building LLVM (e.g. like with clang, libcxx etc.) so that you would not have to specify additional include/library dir/rpath flags during compilation?

Alternatively, right now we manually create symbolic links in <LLVM_PREFIX>/lib/clang/<CLANG_VERSION>/include and <LLVM_PREFIX>/lib to the contents of the OpenMP include/ and lib/ directories respectively. That way we can omit any additional flags during compile time or run time when using OpenMP. Is it possible to specify a relevant option to CMake/configure to automate this installation step?

Thanks a lot in advance,

Michael

This functionality should currently work for CMake by checking out libomp into llvm/projects like you would libcxx or compiler-rt.

– Johnny

Hi Johnny,

Does it have to be a specific name (e.g. “libomp” or “openmp”) or will it work with whatever directory I check out the openmp/trunkt to?

Michael

Right now, no, it can be any name you like it to be.

– Johnny

Hi Johnny,

Thanks a lot, your solution works perfectly (as expected).

Michael

I’m glad it works for you and thanks for letting me know it works.

– Johnny