[Openmp-commits] [openmp] 9ff0cc7 - [openmp] Fix enumeration build issue for openmp library
Ron Lieberman via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 9 03:26:54 PDT 2022
Author: Ron Lieberman
Date: 2022-08-09T10:25:03Z
New Revision: 9ff0cc7e0fa7e99163610d2fcb58e96f3315e343
URL: https://github.com/llvm/llvm-project/commit/9ff0cc7e0fa7e99163610d2fcb58e96f3315e343
DIFF: https://github.com/llvm/llvm-project/commit/9ff0cc7e0fa7e99163610d2fcb58e96f3315e343.diff
LOG: [openmp] Fix enumeration build issue for openmp library
integer value 40962 is outside the valid range of values [0, 31] for this enumeration type [-Wenum-constexpr-conversion]` (Issue #57022)
turn on -Wno-enum-constexpr-conversion to buy some time to fix the more egregious issue in hsa_agent_into_t and hsa_amd_agent_info_t interfaces.
relates to https://reviews.llvm.org/D131307/new/
Differential Revision: https://reviews.llvm.org/D131477
Added:
Modified:
openmp/cmake/HandleOpenMPOptions.cmake
openmp/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
index cfbf5e8ac52f5..e0a9e0d023ab6 100644
--- a/openmp/cmake/HandleOpenMPOptions.cmake
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
@@ -25,6 +25,7 @@ append_if(OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG "-Wimplicit-fallthrough" CMAKE_
append_if(OPENMP_HAVE_WSIGN_COMPARE_FLAG "-Wsign-compare" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
# Warnings that we want to disable because they are too verbose or fragile.
+append_if(OPENMP_HAVE_WNO_ENUM_CONSTEXPR_CONVERSION_FLAG "-Wno-enum-constexpr-conversion" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WNO_EXTRA_FLAG "-Wno-extra" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WNO_PEDANTIC_FLAG "-Wno-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG "-Wno-maybe-uninitialized" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
diff --git a/openmp/cmake/config-ix.cmake b/openmp/cmake/config-ix.cmake
index 20079f1fe5f8e..d88ea9f7e1ad5 100644
--- a/openmp/cmake/config-ix.cmake
+++ b/openmp/cmake/config-ix.cmake
@@ -26,6 +26,7 @@ check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH
check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG)
# Warnings that we want to disable because they are too verbose or fragile.
+check_cxx_compiler_flag(-Wno-enum-constexpr-conversion OPENMP_HAVE_WNO_ENUM_CONSTEXPR_CONVERSION_FLAG)
check_cxx_compiler_flag(-Wno-extra OPENMP_HAVE_WNO_EXTRA_FLAG)
check_cxx_compiler_flag(-Wno-pedantic OPENMP_HAVE_WNO_PEDANTIC_FLAG)
check_cxx_compiler_flag(-Wno-maybe-uninitialized OPENMP_HAVE_WNO_MAYBE_UNINITIALIZED_FLAG)
More information about the Openmp-commits
mailing list