[Openmp-commits] [PATCH] D93738: [OpenMP] Not set OPENMP_STANDALONE_BUILD=ON when building OpenMP along with LLVM

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jan 10 13:46:32 PST 2021


This revision was automatically updated to reflect the committed changes.
tianshilei1992 marked an inline comment as done.
Closed by commit rG7be3285248bf: [OpenMP] Not set OPENMP_STANDALONE_BUILD=ON when building OpenMP along with LLVM (authored by tianshilei1992).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93738/new/

https://reviews.llvm.org/D93738

Files:
  llvm/runtimes/CMakeLists.txt
  openmp/cmake/OpenMPTesting.cmake


Index: openmp/cmake/OpenMPTesting.cmake
===================================================================
--- openmp/cmake/OpenMPTesting.cmake
+++ openmp/cmake/OpenMPTesting.cmake
@@ -190,14 +190,14 @@
         ${comment}
         ${ARG_UNPARSED_ARGUMENTS}
         EXCLUDE_FROM_CHECK_ALL
-        DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
+        DEPENDS clang FileCheck ${ARG_DEPENDS}
         ARGS ${ARG_ARGS}
       )
     else()
       add_lit_testsuite(${target}
         ${comment}
         ${ARG_UNPARSED_ARGUMENTS}
-        DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
+        DEPENDS clang FileCheck ${ARG_DEPENDS}
         ARGS ${ARG_ARGS}
       )
     endif()
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -60,6 +60,7 @@
   project(Runtimes C CXX ASM)
 
   find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+  find_package(Clang PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
 
   # Add the root project's CMake modules, and the LLVM build's modules to the
   # CMake module path.
@@ -136,8 +137,11 @@
     # The subdirectories need to treat this as standalone builds. D57992 tried
     # to get rid of this, but the runtimes treat *_STANDALONE_BUILD=OFF as if
     # llvm & clang are configured in the same CMake, and setup dependencies
-    # against their targets.
-    set(${canon_name}_STANDALONE_BUILD ON)
+    # against their targets. OpenMP has fixed the issue so we don't set the
+    # variable.
+    if (NOT ${canon_name} STREQUAL "OPENMP")
+      set(${canon_name}_STANDALONE_BUILD ON)
+    endif()
 
     if(LLVM_RUNTIMES_LIBDIR_SUBDIR)
       set(${canon_name}_LIBDIR_SUBDIR "${LLVM_RUNTIMES_LIBDIR_SUBDIR}" CACHE STRING "" FORCE)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93738.315678.patch
Type: text/x-patch
Size: 1883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210110/38c377ec/attachment-0001.bin>


More information about the Openmp-commits mailing list