diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -44,6 +44,16 @@ when=lambda cfg: hasCompileFlag(cfg, '-Wuser-defined-warnings'), actions=[AddCompileFlag('-Wuser-defined-warnings')]), + # The default maximum number of operations in a constexpr function are too + # small for some tests. A "correct" value has been determined empirically. + Feature(name='clang-constexpr-steps', + when=lambda cfg: hasCompileFlag(cfg, '-fconstexpr-steps=1'), + actions=[AddCompileFlag('-fconstexpr-steps=128000000')]), + + Feature(name='gcc-constexpr-steps', + when=lambda cfg: hasCompileFlag(cfg, '-fconstexpr-ops-limit=1'), + actions=[AddCompileFlag('-fconstexpr-ops-limit=128000000')]), + 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')),