OSDN Git Service

[OpenMP] Disabled profiling in `libomp` by default to unblock link errors
authorShilei Tian <tianshilei1992@gmail.com>
Thu, 28 Jan 2021 12:24:19 +0000 (07:24 -0500)
committerShilei Tian <tianshilei1992@gmail.com>
Thu, 4 Feb 2021 15:25:01 +0000 (10:25 -0500)
commit92a5106e8055bab7da46095a832904444862728b
tree5da776fc43f9868ca4c857470d2313e37710071a
parent66c7b449acf402bdc87b69db5778b7b43958d217
[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

(cherry picked from commit c571b168349fdf22d1dc8b920bcffa3d5161f0a2)
openmp/CMakeLists.txt
openmp/docs/design/Runtimes.rst
openmp/runtime/CMakeLists.txt
openmp/runtime/src/CMakeLists.txt
openmp/runtime/src/kmp_config.h.cmake
openmp/runtime/src/kmp_runtime.cpp