Skip to content

Increase constexpr steps limit for clang builds#10539

Open
cocosolos wants to merge 1 commit into
LandSandBoat:basefrom
cocosolos:step-limit
Open

Increase constexpr steps limit for clang builds#10539
cocosolos wants to merge 1 commit into
LandSandBoat:basefrom
cocosolos:step-limit

Conversation

@cocosolos

@cocosolos cocosolos commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Double Clang's default constexpr evaluation step limit so the compile-time RNG distribution tests compile reliably with Release build configurations.

#23 2372.8 /server/src/test/tests/rng_spread_tests.cpp:128:15: error: static assertion expression is not an integral constant expression
#23 2372.8   128 | static_assert(spreadWithin<10, kIntSamples>(0xDEADBEEF, 90), "integer spread too skewed");           // within 9%
#23 2372.8       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 2372.8 /server/src/test/tests/rng_spread_tests.cpp:68:5: note: constexpr evaluation hit maximum step limit; possible infinite loop?
#23 2372.8    68 |     {
#23 2372.8       |     ^
#23 2372.8 /server/src/test/tests/rng_spread_tests.cpp:103:12: note: in call to 'maxBucketDeviation<10U, 24000U, Squirrel5>(3735928559)'
#23 2372.8   103 |     return maxBucketDeviation<Buckets, Samples, Engine>(seed) <= allowed;
#23 2372.8       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 2372.8 /server/src/test/tests/rng_spread_tests.cpp:128:15: note: in call to 'spreadWithin<10U, 24000U, Squirrel5>(3735928559, 90)'
#23 2372.8   128 | static_assert(spreadWithin<10, kIntSamples>(0xDEADBEEF, 90), "integer spread too skewed");           // within 9%
#23 2372.8       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 2372.8 1 error generated.

Steps to test these changes

https://github.com/cocosolos/server/actions/runs/28992481674

@WinterSolstice8 WinterSolstice8 enabled auto-merge July 8, 2026 17:50
@zach2good

Copy link
Copy Markdown
Contributor

We'd ideally set it to just high enough that the current constexpr tests pass, and only set this on the TUs that need it

@cocosolos cocosolos marked this pull request as draft July 8, 2026 19:46
auto-merge was automatically disabled July 8, 2026 19:46

Pull request was converted to draft

@cocosolos cocosolos marked this pull request as ready for review July 9, 2026 05:30
@cocosolos cocosolos changed the title [docker] Disable constexpr steps limit for clang builds Increase constexpr steps limit for clang builds Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants