Make benchmarks compiling in clang-cl by AlexGuteniev · Pull Request #5533 · microsoft/STL · GitHub
Skip to content

Make benchmarks compiling in clang-cl#5533

Merged
StephanTLavavej merged 8 commits into
microsoft:mainfrom
AlexGuteniev:benchmark-clang-cl
Jun 14, 2025
Merged

Make benchmarks compiling in clang-cl#5533
StephanTLavavej merged 8 commits into
microsoft:mainfrom
AlexGuteniev:benchmark-clang-cl

Conversation

@AlexGuteniev

@AlexGuteniev AlexGuteniev commented May 23, 2025

Copy link
Copy Markdown
Contributor

Towards #5479

Most of the time it is warning about deprecated benchmark::DoNotOptimize for constants.

🏗️ Build steps

Build STL as usual:

cmake --preset x64
cmake --build --preset x64

Then add -DCMAKE_CXX_COMPILER=clang-cl to benchmark build:

cmake -B out\bench -S benchmarks -G Ninja -DSTL_BINARY_DIR=out\x64 -DCMAKE_CXX_COMPILER=clang-cl
cmake --build out\bench

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner May 23, 2025 06:06
@github-project-automation github-project-automation Bot moved this to Initial Review in STL Code Reviews May 23, 2025

@frederick-vs-ja frederick-vs-ja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I wonder why changes elsewhere are relevant.

Comment thread benchmarks/src/bitset_to_string.cpp
Comment thread benchmarks/src/bitset_to_string.cpp
Comment thread benchmarks/src/move_only_function.cpp

@AlexGuteniev AlexGuteniev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frederick-vs-ja the rest are just const that can potentially be optimized, so DoNotOptimize is deprecated

Comment thread benchmarks/src/priority_queue_push_range.cpp Outdated
Comment thread benchmarks/src/search.cpp
Comment thread benchmarks/src/locale_classic.cpp
@StephanTLavavej StephanTLavavej self-assigned this May 27, 2025
@StephanTLavavej StephanTLavavej added the test Related to test code label May 27, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

@StephanTLavavej StephanTLavavej removed their assignment May 29, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews May 29, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Jun 11, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7381f2f into microsoft:main Jun 14, 2025
48 checks passed
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews Jun 14, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Related to test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants