[libcxx-commits] [libcxx] 87dd8c7 - [libc++][CI] increases constexpr evaluation limit.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 31 10:16:50 PDT 2022
Author: Mark de Wever
Date: 2022-08-31T19:16:40+02:00
New Revision: 87dd8c72893485a31c9b5a8dad717a75214390f5
URL: https://github.com/llvm/llvm-project/commit/87dd8c72893485a31c9b5a8dad717a75214390f5
DIFF: https://github.com/llvm/llvm-project/commit/87dd8c72893485a31c9b5a8dad717a75214390f5.diff
LOG: [libc++][CI] increases constexpr evaluation limit.
This was discovered as an issue in D131317.
Depends on D131835
Reviewed By: #libc, var-const, ldionne, philnik
Differential Revision: https://reviews.llvm.org/D131836
Added:
Modified:
libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp
libcxx/utils/libcxx/test/features.py
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp
index db52ac9fd3144..1b833075f1a66 100644
--- a/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp
+++ b/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp
@@ -10,6 +10,9 @@
// UNSUPPORTED: !stdlib=libc++ && c++11
// UNSUPPORTED: !stdlib=libc++ && c++14
+// ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-steps): -fconstexpr-steps=12712420
+// ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-ops-limit): -fconstexpr-ops-limit=12712420
+
// <charconv>
// to_chars_result to_chars(char* first, char* last, Integral value,
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 46bbd2427f0a7..829fd1901363a 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -44,6 +44,18 @@ def _hasSuitableClangQuery(cfg):
when=lambda cfg: hasCompileFlag(cfg, '-Wuser-defined-warnings'),
actions=[AddCompileFlag('-Wuser-defined-warnings')]),
+ # Tests to validate whether the compiler has a way to set the maximum number
+ # of steps during constant evaluation. Since the flag
diff ers per compiler
+ # store the "valid" flag as a feature. This allows passing the proper compile
+ # flag to the compiler:
+ # // ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-steps): -fconstexpr-steps=12345678
+ # // ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-ops-limit): -fconstexpr-ops-limit=12345678
+ Feature(name='has-fconstexpr-steps',
+ when=lambda cfg: hasCompileFlag(cfg, '-fconstexpr-steps=1')),
+
+ Feature(name='has-fconstexpr-ops-limit',
+ when=lambda cfg: hasCompileFlag(cfg, '-fconstexpr-ops-limit=1')),
+
Feature(name='has-fblocks', when=lambda cfg: hasCompileFlag(cfg, '-fblocks')),
Feature(name='-fsized-deallocation', when=lambda cfg: hasCompileFlag(cfg, '-fsized-deallocation')),
Feature(name='-faligned-allocation', when=lambda cfg: hasCompileFlag(cfg, '-faligned-allocation')),
More information about the libcxx-commits
mailing list