[Openmp-commits] [openmp] r309126 - Merging r309115:

Hans Wennborg via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 26 08:47:04 PDT 2017


Author: hans
Date: Wed Jul 26 08:47:03 2017
New Revision: 309126

URL: http://llvm.org/viewvc/llvm-project?rev=309126&view=rev
Log:
Merging r309115:
------------------------------------------------------------------------
r309115 | hahnfeld | 2017-07-26 06:55:00 -0700 (Wed, 26 Jul 2017) | 15 lines

[CMake] Disable building libomptarget and add CMake switch

Introduce OPENMP_ENABLE_LIBOMPTARGET which defaults to OFF at the moment.

libomptarget is not yet ready for prime time:
 - Offloading to NVIDIA GPUs is not completed yet (compiler, device RTL)
 - The generic ELF plugin for offloading to the host (meant for testing)
   uses a single instance of the OpenMP runtime (libomp). That is why
   omp_is_initial_device() returns 1 which makes the tests fail.
Because of these reasons, we want to disable building (and testing!)
for release 5.0.

See https://bugs.llvm.org/show_bug.cgi?id=33859

Differential Revision: https://reviews.llvm.org/D35719
------------------------------------------------------------------------

Modified:
    openmp/branches/release_50/   (props changed)
    openmp/branches/release_50/CMakeLists.txt

Propchange: openmp/branches/release_50/
------------------------------------------------------------------------------
    svn:mergeinfo = /openmp/trunk:309115

Modified: openmp/branches/release_50/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_50/CMakeLists.txt?rev=309126&r1=309125&r2=309126&view=diff
==============================================================================
--- openmp/branches/release_50/CMakeLists.txt (original)
+++ openmp/branches/release_50/CMakeLists.txt Wed Jul 26 08:47:03 2017
@@ -4,9 +4,20 @@ set(OPENMP_LLVM_TOOLS_DIR "" CACHE PATH
 
 add_subdirectory(runtime)
 
+
+# The tests currently don't pass if the generic ELF plugin is built.
+# TODO: Fix the tests and enable libomptarget by default on supported
+#       architectures and platforms.
+set(ENABLE_LIBOMPTARGET OFF)
 # Currently libomptarget cannot be compiled on Windows or MacOS X.
 # Since the device plugins are only supported on Linux anyway,
 # there is no point in trying to compile libomptarget on other OSes.
-if (NOT (WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
+if (WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+  set(ENABLE_LIBOMPTARGET OFF)
+endif()
+
+option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading."
+       ${ENABLE_LIBOMPTARGET})
+if (OPENMP_ENABLE_LIBOMPTARGET)
   add_subdirectory(libomptarget)
 endif()




More information about the Openmp-commits mailing list