summaryrefslogtreecommitdiff
path: root/openmp/CMakeLists.txt
diff options
context:
space:
mode:
authorShilei Tian <tianshilei1992@gmail.com>2021-01-28 07:24:19 -0500
committerShilei Tian <tianshilei1992@gmail.com>2021-01-28 07:24:32 -0500
commitc571b168349fdf22d1dc8b920bcffa3d5161f0a2 (patch)
tree5b7ded0d5c6dad3389339ce9c5b3f5dadf86dbd8 /openmp/CMakeLists.txt
parent6663330bc8c84a75ea092272297b557bfc310380 (diff)
downloadllvm-c571b168349fdf22d1dc8b920bcffa3d5161f0a2.tar.gz
[OpenMP] Disabled profiling in `libomp` by default to unblock link errors
Link error occurred when time profiling in libomp is enabled by default because `libomp` is assumed to be a C library but the dependence on `libLLVMSupport` for profiling is a C++ library. Currently the issue blocks all OpenMP tests in Phabricator. This patch set a new CMake option `OPENMP_ENABLE_LIBOMP_PROFILING` to enable/disable the feature. By default it is disabled. Note that once time profiling is enabled for `libomp`, it becomes a C++ library. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D95585
Diffstat (limited to 'openmp/CMakeLists.txt')
-rw-r--r--openmp/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index f89857dc98d6..b8a2822877e3 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -81,6 +81,7 @@ option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading."
${ENABLE_LIBOMPTARGET})
option(OPENMP_ENABLE_LIBOMPTARGET_PROFILING "Enable time profiling for libomptarget."
${ENABLE_LIBOMPTARGET})
+option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
# Build host runtime library, after LIBOMPTARGET variables are set since they are needed
# to enable time profiling support in the OpenMP runtime.