[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
Fri Jan 25 11:15:07 PST 2019


jdenny updated this revision to Diff 183577.
jdenny edited the summary of this revision.
jdenny added a comment.

- Rename openmp's Clang-dedicated directory from `lib/clang/9.0.0/lib/linux/x86_64` to `lib/clang/9.0.0/x86_64-unknown-linux-gnu/lib` because the latter is what other subprojects we've looked at use.

- When openmp and clang are built together, expand `9.0.0` and `x86_64-unknown-linux-gnu` from `PACKAGE_VERSION` and `LLVM_DEFAULT_TARGET_TRIPLE`.

- When openmp is built standalone but the C++ compiler is a recent Clang, use Clang to get `9.0.0` and `x86_64-unknown-linux-gnu` (`clang --print-target-triple` tells us unless it's an old Clang).  This is helpful when building openmp after clang in order to build bitcode libraries as in step 4 in the following instructions:

  https://www.hahnjo.de/blog/2018/10/08/clang-7.0-openmp-offloading-nvidia.html

- Otherwise, `OPENMP_CLANG_VERSION` and `OPENMP_CLANG_TARGET_TRIPLE` can be specified as cmake variables.

- As discussed, this patch still does not observe the cmake variable `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR`, which other subprojects observe.  Instead, it always installs both to `lib` and to the Clang-dedicated directory normally selected by that option.  An RFC will hopefully determine if this is really the better choice.

- This patch still does not change things for the `libiomp5.so` and `libgomp.so` sym links .  That discussion is ongoing.

- This patch still copies rather than sym links between `lib` and the Clang-dedicated directory.  The cmake `create_symlink` is UNIX-specific.  I'm not a windows developer, so I'm not sure if the best formula is to skip these for windows or create copies instead.  I'll research this, but maybe someone else already knows?


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

https://reviews.llvm.org/D55725

Files:
  openmp/CMakeLists.txt
  openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
  openmp/libomptarget/plugins/CMakeLists.txt
  openmp/libomptarget/plugins/cuda/CMakeLists.txt
  openmp/libomptarget/src/CMakeLists.txt
  openmp/runtime/src/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55725.183577.patch
Type: text/x-patch
Size: 9864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190125/4c2b53d1/attachment-0001.bin>


More information about the Openmp-commits mailing list