[Openmp-commits] [PATCH] D114346: [runtimes][openmp] Change to not treat ARCH-unknown-linux-gnu as errors

Kazushi Marukawa via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Nov 21 22:20:56 PST 2021


kaz7 created this revision.
kaz7 added reviewers: tra, ABataev, JonChesterfield, jdoerfert, ye-luo.
kaz7 added a project: OpenMP.
Herald added subscribers: guansong, yaxunl, mgorny.
kaz7 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.

When OpenMP is compiled as a part runtimes for multiple targets, openmp
is compiled under build/runtimes/runtimes-arch-unknown-linux-gnu-bins
directory.  Old implementation treats this directory name as errors.
This patch adds a guard like "[Uu]known[^-]".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114346

Files:
  openmp/runtime/cmake/LibompCheckFortranFlag.cmake
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake


Index: openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
===================================================================
--- openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
+++ openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
@@ -21,7 +21,9 @@
      project(foo C)
      set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\")
      add_library(foo SHARED src_to_link.c)")
-  set(failed_regexes "[Ee]rror;[Uu]nknown;[Ss]kipping;LINK : warning")
+  # Compiling as a part of runtimes introduces ARCH-unknown-linux-gnu as a part
+  # of a working directory.  So adding a guard for unknown.
+  set(failed_regexes "[Ee]rror;[Uu]nknown[^-];[Ss]kipping;LINK : warning")
   set(base_dir ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/link_flag_check_${boolean})
   file(MAKE_DIRECTORY ${base_dir})
   file(MAKE_DIRECTORY ${base_dir}/build)
Index: openmp/runtime/cmake/LibompCheckFortranFlag.cmake
===================================================================
--- openmp/runtime/cmake/LibompCheckFortranFlag.cmake
+++ openmp/runtime/cmake/LibompCheckFortranFlag.cmake
@@ -19,7 +19,9 @@
            print *, \"Hello World!\"
       end program hello")
 
-    set(failed_regexes "[Ee]rror;[Uu]nknown;[Ss]kipping")
+    # Compiling as a part of runtimes introduces ARCH-unknown-linux-gnu as a
+    # part of a working directory.  So adding a guard for unknown.
+    set(failed_regexes "[Ee]rror;[Uu]nknown[^-];[Ss]kipping")
     include(CheckFortranSourceCompiles)
     check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
     set(${boolean} ${${boolean}} PARENT_SCOPE)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114346.388792.patch
Type: text/x-patch
Size: 1602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211122/20df26ac/attachment.bin>


More information about the Openmp-commits mailing list