summaryrefslogtreecommitdiff
path: root/openmp/cmake
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-11-25 16:26:50 +0200
committerMartin Storsjö <martin@martin.st>2022-11-29 23:16:10 +0200
commit2bd2734f445b434fbaa56f35797f40d7c0d91a6e (patch)
tree4e0bfca85afddbf9cf85d62e11a86c44a08aefcd /openmp/cmake
parent98454e388500de2f264c06b555d6009614f8f56e (diff)
downloadllvm-2bd2734f445b434fbaa56f35797f40d7c0d91a6e.tar.gz
Reapply [openmp] [test] XFAIL many-microtask-args.c on ARM
On ARM, a C fallback version of __kmp_invoke_microtask is used, which only handles up to a fixed number of arguments - while many-microtask-args.c tests that the function can handle an arbitrarily large number of arguments (the testcase produces 17 arguments). On the CMake level, we can't add ${LIBOMP_ARCH} directly to OPENMP_TEST_COMPILER_FEATURES in OpenMPTesting.cmake, since that file is parsed before LIBOMP_ARCH is set. Instead convert the feature list into a proper CMake list, and append ${LIBOMP_ARCH} into it before serializing it to an Python array. Reapply: Make sure OPENMP_TEST_COMPILER_FEATURES is defined properly in all other test subdirectories other than runtime/test too. Differential Revision: https://reviews.llvm.org/D138738
Diffstat (limited to 'openmp/cmake')
-rw-r--r--openmp/cmake/OpenMPTesting.cmake17
1 files changed, 16 insertions, 1 deletions
diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index a93f7199ed7a..01f49cfaea78 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -159,6 +159,20 @@ else()
endif()
# Function to set compiler features for use in lit.
+function(update_test_compiler_features)
+ set(FEATURES "[")
+ set(first TRUE)
+ foreach(feat IN LISTS OPENMP_TEST_COMPILER_FEATURE_LIST)
+ if (NOT first)
+ string(APPEND FEATURES ", ")
+ endif()
+ set(first FALSE)
+ string(APPEND FEATURES "'${feat}'")
+ endforeach()
+ string(APPEND FEATURES "]")
+ set(OPENMP_TEST_COMPILER_FEATURES ${FEATURES} PARENT_SCOPE)
+endfunction()
+
function(set_test_compiler_features)
if ("${OPENMP_TEST_COMPILER_ID}" STREQUAL "GNU")
set(comp "gcc")
@@ -168,9 +182,10 @@ function(set_test_compiler_features)
# Just use the lowercase of the compiler ID as fallback.
string(TOLOWER "${OPENMP_TEST_COMPILER_ID}" comp)
endif()
- set(OPENMP_TEST_COMPILER_FEATURES "['${comp}', '${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR}', '${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR}', '${comp}-${OPENMP_TEST_COMPILER_VERSION}']" PARENT_SCOPE)
+ set(OPENMP_TEST_COMPILER_FEATURE_LIST ${comp} ${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR} ${comp}-${OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR} ${comp}-${OPENMP_TEST_COMPILER_VERSION} PARENT_SCOPE)
endfunction()
set_test_compiler_features()
+update_test_compiler_features()
# Function to add a testsuite for an OpenMP runtime library.
function(add_openmp_testsuite target comment)