[Openmp-commits] [PATCH] D55725: [OpenMP] Add libs to clang-dedicated directories

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 24 14:00:51 PST 2019


jdenny added a comment.

I'm trying to better understand how various LLVM subprojects currently (without this patch) install to Clang-dedicated library directories.  I'm building with the following:

  -DLLVM_ENABLE_PROJECTS='clang;openmp;libcxx;libcxxabi;lldb;compiler-rt;lld;polly;libunwind'

I then see the following effects from `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=True`:

- Rename the Clang-dedicated directory from `lib/clang/9.0.0/lib/linux` to `lib/clang/9.0.0/x86_64-unknown-linux-gnu/lib`.
- For the `libclang_rt.*-x86_64.*` there, drop the now redundant `-x86_64.` components from their names.
- Move `libc++*` and `libunwind*` from `lib` to the Clang-dedicated directory.

The OpenMP libraries to consider are:

- `libgomp.so`, `libiomp5.so`: My understanding is that these symlinks exist solely for backward compatibility.  This patch currently doesn't affect them (doesn't bother to install them to Clang-dedicated directories).  Any reason to change that?
- `libomp.so`
- `libomptarget.rtl.x86_64.so`, `libomptarget.so`
- `libomptarget-nvptx.a`, `libomptarget.rtl.cuda.so`

My plan for the non-symlinks is:

- Always install to `lib` in case that matters for backward compatibility.
- With `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=True`, additionally install to `lib/clang/9.0.0/x86_64-unknown-linux-gnu/lib`.
- Without `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=True`, where should they be additionally installed?
  - Just `lib` is bad for users because the problem this patch tries to solve then remains in the default case.
  - `lib/clang/9.0.0/lib/linux` currently appears to be specific to `libclang_rt.*`.  Unless I missed something, we'd have to modify Clang to get it to find other libraries there.
  - `lib/clang/9.0.0/lib/linux/x86_64` is what this patch currently chooses as it's another place Clang looks.  But is that any better or worse than the next option?
  - `lib/clang/9.0.0/x86_64-unknown-linux-gnu/lib` would mean `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=True` is effectively always set for OpenMP.  Is that bad?  I'm planning to choose this option unless there are objections.


Repository:
  rOMP OpenMP

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55725/new/

https://reviews.llvm.org/D55725





More information about the Openmp-commits mailing list