Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@theComputeKid
Copy link
Contributor

@theComputeKid theComputeKid commented Dec 28, 2024

The /MP flag only applies to cl, not cl frontends to other compilers (e.g. clang-cl, icx-cl etc), whereas the MSVC cmake variable applies to every compiler with a cl frontend. Therefore, we need to reduce the scope of /MP to only MSVC's cl, so that the other cl frontends can compile without warnings.

Fixes #1869

Reproduction steps to test solution on Windows with the LLVM toolchain installed:

cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER=lld-link -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
cmake --build build
ctest --test-dir build

- MP flag only applies to cl, not cl frontends to other compilers (e.g. clang-cl, icx-cl etc).
@dmah42
Copy link
Member

dmah42 commented Jan 8, 2025

i'm looking at the clang-tidy issue in #1898

@dmah42
Copy link
Member

dmah42 commented Jan 8, 2025

i'm looking at the windows clang32 issues too ... looks like the msys2 environment doesn't include cc. either way this PR looks good.

@dmah42 dmah42 merged commit 7ddc400 into google:main Jan 8, 2025
75 of 86 checks passed
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.

[BUG] Does not build with clang-cl

2 participants