[Openmp-commits] [openmp] c5b7c7c - [NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build.

Vyacheslav Zakharin via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 18 09:21:24 PDT 2021


Author: Vyacheslav Zakharin
Date: 2021-06-18T09:20:10-07:00
New Revision: c5b7c7c8f7fc645a3755c6e2f97f8e8710ee5ff9

URL: https://github.com/llvm/llvm-project/commit/c5b7c7c8f7fc645a3755c6e2f97f8e8710ee5ff9
DIFF: https://github.com/llvm/llvm-project/commit/c5b7c7c8f7fc645a3755c6e2f97f8e8710ee5ff9.diff

LOG: [NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build.

Differential Revision: https://reviews.llvm.org/D104535

Added: 
    

Modified: 
    openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
    openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake b/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
index 73ab8023773c..61704a101e72 100644
--- a/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
+++ b/openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
@@ -33,9 +33,16 @@ if (OPENMP_STANDALONE_BUILD)
   list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR})
   include(AddLLVM)
 else()
+  # Note that OPENMP_STANDALONE_BUILD is FALSE, when
+  # openmp is built with -DLLVM_ENABLE_RUNTIMES="openmp" vs
+  # -DLLVM_ENABLE_PROJECTS="openmp", but openmp build
+  # is actually done as a standalone project build with many
+  # LLVM CMake variables propagated to it.
   list(APPEND LIBOMPTARGET_LLVM_INCLUDE_DIRS
     ${LLVM_MAIN_INCLUDE_DIR} ${LLVM_BINARY_DIR}/include
     )
+  message(STATUS
+    "Using LLVM include directories: ${LIBOMPTARGET_LLVM_INCLUDE_DIRS}")
 endif()
 
 ################################################################################

diff  --git a/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt b/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
index de062b9b5fd6..f588053d8818 100644
--- a/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
@@ -15,6 +15,7 @@ add_library(elf_common OBJECT elf_common.cpp)
 llvm_update_compile_flags(elf_common)
 set(LINK_LLVM_LIBS LLVMBinaryFormat LLVMObject LLVMSupport)
 target_link_libraries(elf_common INTERFACE ${LINK_LLVM_LIBS} ${LIBOMPTARGET_DEP_LIBELF_LIBRARIES})
+include_directories(${LIBOMPTARGET_LLVM_INCLUDE_DIRS})
 add_dependencies(elf_common ${LINK_LLVM_LIBS})
 
 # The code uses Debug.h, which requires threads support.


        


More information about the Openmp-commits mailing list