[Openmp-commits] [PATCH] D114083: [OpenMP] Disable libomptarget profiling by default if built via the "runtimes" setup

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 17 05:18:11 PST 2021


mstorsjo created this revision.
mstorsjo added reviewers: phosek, pdhaliwal, AndreyChurbanov, jdoerfert.
Herald added subscribers: guansong, yaxunl, mgorny.
mstorsjo requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

In the "runtimes" setup, the runtime (e.g. OpenMP) can be built for
a target entirely different from the current host build (where LLVM
and Clang are built). If profiling is enabled, libomptarget links
against LLVMSupport (which only has been built for the host).

Thus, don't enable profiling by default in this setup.

This should allow relanding D113253 <https://reviews.llvm.org/D113253>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114083

Files:
  openmp/CMakeLists.txt


Index: openmp/CMakeLists.txt
===================================================================
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -61,10 +61,15 @@
   set(ENABLE_LIBOMPTARGET OFF)
 endif()
 
+set(ENABLE_LIBOMPTARGET_PROFILING OFF)
+if (ENABLE_LIBOMPTARGET AND NOT LLVM_RUNTIMES_BUILD)
+  set(ENABLE_LIBOMPTARGET_PROFILING ON)
+endif()
+
 option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading."
        ${ENABLE_LIBOMPTARGET})
 option(OPENMP_ENABLE_LIBOMPTARGET_PROFILING "Enable time profiling for libomptarget."
-       ${ENABLE_LIBOMPTARGET})
+       ${ENABLE_LIBOMPTARGET_PROFILING})
 option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
 
 # Build host runtime library, after LIBOMPTARGET variables are set since they are needed


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114083.387910.patch
Type: text/x-patch
Size: 805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211117/95e22e7e/attachment-0001.bin>


More information about the Openmp-commits mailing list