[Openmp-commits] [openmp] 5e2358c - [runtimes][openmp] Change to not treat ARCH-unknown-linux-gnu as errors
Kazushi Marukawa via Openmp-commits
openmp-commits at lists.llvm.org
Tue Nov 30 15:33:43 PST 2021
Author: Kazushi (Jam) Marukawa
Date: 2021-12-01T08:33:37+09:00
New Revision: 5e2358c781b85a18d1463fd924d2741d4ae5e42e
URL: https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e
DIFF: https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.diff
LOG: [runtimes][openmp] Change to not treat ARCH-unknown-linux-gnu as errors
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[^-]".
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D114346
Added:
Modified:
openmp/runtime/cmake/LibompCheckFortranFlag.cmake
openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
Removed:
################################################################################
diff --git a/openmp/runtime/cmake/LibompCheckFortranFlag.cmake b/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
index b8cdb28a4bf28..344389f989388 100644
--- a/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
+++ b/openmp/runtime/cmake/LibompCheckFortranFlag.cmake
@@ -19,7 +19,9 @@ function(libomp_check_fortran_flag flag boolean)
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)
diff --git a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
index e601e53f11237..fb284599ca386 100644
--- a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
+++ b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
@@ -21,7 +21,9 @@ function(libomp_check_linker_flag flag boolean)
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)
More information about the Openmp-commits
mailing list