[Openmp-commits] [PATCH] D108640: [OpenMP][amdgcn] Don't use in-tree clang if not available.

Michael Kruse via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 24 10:51:04 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1275ee304104: [OpenMP][amdgcn] Don't use in-tree clang if not available. (authored by Meinersbur).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108640

Files:
  openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt


Index: openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
===================================================================
--- openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -43,12 +43,15 @@
     NO_DEFAULT_PATH)
   find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
   libomptarget_say("Building AMDGCN device RTL. Using clang: ${CLANG_TOOL}")
-else()
+elseif (LLVM_TOOL_CLANG_BUILD AND NOT CMAKE_CROSSCOMPILING AND NOT OPENMP_STANDALONE_BUILD)
   # LLVM in-tree builds may use CMake target names to discover the tools.
   set(CLANG_TOOL $<TARGET_FILE:clang>)
   set(LINK_TOOL $<TARGET_FILE:llvm-link>)
   set(OPT_TOOL $<TARGET_FILE:opt>)
   libomptarget_say("Building AMDGCN device RTL. Using clang from in-tree build")
+else()
+  libomptarget_say("Not building AMDGCN device RTL. No appropriate clang found")
+  return()
 endif()
 
 project(omptarget-amdgcn)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108640.368399.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210824/150cb864/attachment.bin>


More information about the Openmp-commits mailing list