aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgis Georgakoudis <georgakoudis1@llnl.gov>2021-01-25 09:48:12 -0800
committerGiorgis Georgakoudis <georgakoudis1@llnl.gov>2021-01-27 06:46:40 -0800
commit1e59c1a89851534f162d5ada9fb61796710e4de5 (patch)
tree6b538202a56fa195dd2a3b499fa59de7919b4b6d
parentbb40e6731843de92f1c73ad6efceb8a89e045ea6 (diff)
downloadllvm-1e59c1a89851534f162d5ada9fb61796710e4de5.zip
llvm-1e59c1a89851534f162d5ada9fb61796710e4de5.tar.gz
llvm-1e59c1a89851534f162d5ada9fb61796710e4de5.tar.bz2
[OpenMP][Libomptarget] Fix check-libomptarget
The check-libomptarget fails when building with LLVM_ENABLE_PROJECTS. This is because test configuration misses the path to libomp.so and libLLVMSupport.so when time profiling is enabled (both libraries have the same path when building). This patch add the path to the configuration. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D95376
-rw-r--r--openmp/README.rst4
-rw-r--r--openmp/libomptarget/CMakeLists.txt12
2 files changed, 6 insertions, 10 deletions
diff --git a/openmp/README.rst b/openmp/README.rst
index e235993..32b4dfa 100644
--- a/openmp/README.rst
+++ b/openmp/README.rst
@@ -248,8 +248,8 @@ Options for ``libomptarget``
out-of-tree builds.
**LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER** = ``""``
- Path of the folder that contains ``libomp.so``. This is required for testing
- out-of-tree builds.
+ Path of the folder that contains ``libomp.so``, and ``libLLVMSupport.so``
+ when profiling is enabled. This is required for testing.
Options for ``NVPTX device RTL``
--------------------------------
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt
index 6c90ced..ec4f87e 100644
--- a/openmp/libomptarget/CMakeLists.txt
+++ b/openmp/libomptarget/CMakeLists.txt
@@ -68,14 +68,10 @@ set(LIBOMPTARGET_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(${LIBOMPTARGET_SRC_DIR})
# Definitions for testing, for reuse when testing libomptarget-nvptx.
-if(OPENMP_STANDALONE_BUILD)
- set(LIBOMPTARGET_OPENMP_HEADER_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/../runtime/src" CACHE STRING
- "Path to folder containing omp.h")
- set(LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/../runtime/src" CACHE STRING
- "Path to folder containing libomp.so")
-else()
- set(LIBOMPTARGET_OPENMP_HEADER_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/../runtime/src")
-endif()
+set(LIBOMPTARGET_OPENMP_HEADER_FOLDER "${LIBOMP_INCLUDE_DIR}" CACHE STRING
+ "Path to folder containing omp.h")
+set(LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER "${LIBOMP_LIBRARY_DIR}" CACHE STRING
+ "Path to folder containing libomp.so, and libLLVMSupport.so with profiling enabled")
# Build offloading plugins and device RTLs if they are available.