Skip to content

clang-cl.exe does not support /analyze flag #774

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

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Oct 3, 2024

Description

Disable setting the /analyze flag on Windows if the compiler ID does not equal MSVC, this fixes builds using the clang-cl.exe frontend which does not support this flag.

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

Disable setting the `/analyze` flag on Windows if the compiler ID does
not equal MSVC, this fixes builds using the `clang-cl.exe` frontend
which does not support this flag.
Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

should this be still a draft...?

@kbenzie kbenzie marked this pull request as ready for review October 4, 2024 09:39
@kbenzie kbenzie requested a review from a team as a code owner October 4, 2024 09:39
@kbenzie
Copy link
Contributor Author

kbenzie commented Oct 4, 2024

should this be still a draft...?

I was waiting for the CI to pass.

Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

out of curiosity, where was it found? not sure if we should care to add some extra CI job...

@kbenzie
Copy link
Contributor Author

kbenzie commented Oct 4, 2024

out of curiosity, where was it found? not sure if we should care to add some extra CI job...

My local UR Windows build with OpenCL and Level Zero enabled using -DCMAKE_C_COMPILE=clang-cl and -DCMAKE_CXX_COMPILER=clang-cl. I was initially using the clang-cl from the LLVM Chocolatey package but later I removed that and used modified my Visual Studio 2022 install to include all of the Individual Components with clang in the name and got the same error. Here's the cmake command I used locally in a Visual Studio 2022 PowerShell Developer Prompt:

cmake . -Bbuild-clang-r -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DUR_DEVELOPER_MODE=ON -DUR_BUILD_ADAPTER_L0=ON -DUR_BUILD_ADAPTER_OPENCL=ON -DUMF_DISABLE_HWLOC=ON "-DUR_DPCXX=P:/intel/llvm/build-r/bin/clang++.exe"

The ccache options are not necessary.

@ldorau ldorau merged commit e082fc4 into oneapi-src:main Oct 7, 2024
72 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.

4 participants