Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Does not build with clang-cl #1869

Open
R-Goc opened this issue Oct 24, 2024 · 0 comments
Open

[BUG] Does not build with clang-cl #1869

R-Goc opened this issue Oct 24, 2024 · 0 comments

Comments

@R-Goc
Copy link

R-Goc commented Oct 24, 2024

Describe the bug
Due to adding the /MP option to MSVC like compilers, benchmark doesn't build on clang-cl or icx-cl as they don't handle it in any way, and will throw an unused command line option warning. Due to -Werror this will cause the compilation to fail.

System
Which OS, compiler, and compiler version are you using:

  • OS: Windows 11
  • Compiler and version: Clang-cl 19

To reproduce
Steps to reproduce the behavior:

  1. sync to commit ... master
  2. cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER=lld-link -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
  3. cmake --build build
  4. See error

Expected behavior
Builds with no modification to cmakelists (removing MP solves it).
The solution would be checking if it is clang, and if so omitting /MP. Not sure how to check for icx.

Screenshots
Image

Additional context
Also should affect icx-cl, as it is based on clang.

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

No branches or pull requests

2 participants