You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we have a somewhat complicated build environment, and I'd like some advice on the best way to configure clang-tidy within VSCode C_cpp tools.
Here is the situation:
Our project builds using CMake and the VSCode CMake extension.
Our project builds on x86_64 host machine, and we build for two targets:
GCC 7.5.0 x86_64-linux-gnu
GCC 7.5.0 aarch64-linux-gnu
we are using clang-tidy-10
this is all on a ubu18.04 WSL, and none of the above tools can be updated to newer versions for various reasons.
VSCode 1.85.2
C_Cpp v1.21.6
When we have vscode + cmake configured for the native x86_64 build, we get zero warnings from clang-tidy using the configuration provided below.
However, when we set the active cmake target to be the aarch64 cross compile, our clang-tidy blows up with errors shown below.
We would be fine with configuring clang-tidy to always do its analysis based on x86_64, regardless of the target architecture of the build
How can we configure clang-tidy in VS code to do what we want (get the same analysis whether we are building native x86_64 or cross compiling for aarch64?
(we've experimented with "--extra-arg=--target=aarch64" in the clang-tidy args, and toggling useBuildPath both ways, with no success, it just seems to push the problem around to slightly different output of header/include warnings).
Thanks in advance!
-Eric.
relevant VSCode/Clang-tidy config from workspace settings.json:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, we have a somewhat complicated build environment, and I'd like some advice on the best way to configure clang-tidy within VSCode C_cpp tools.
Here is the situation:
When we have vscode + cmake configured for the native x86_64 build, we get zero warnings from clang-tidy using the configuration provided below.
However, when we set the active cmake target to be the aarch64 cross compile, our clang-tidy blows up with errors shown below.
We would be fine with configuring clang-tidy to always do its analysis based on x86_64, regardless of the target architecture of the build
How can we configure clang-tidy in VS code to do what we want (get the same analysis whether we are building native x86_64 or cross compiling for aarch64?
(we've experimented with
"--extra-arg=--target=aarch64"
in the clang-tidy args, and togglinguseBuildPath
both ways, with no success, it just seems to push the problem around to slightly different output of header/include warnings).Thanks in advance!
-Eric.
relevant VSCode/Clang-tidy config from workspace settings.json:
Clang-tidy gives zero warnings when building x86_64.
Clang-tidy warnings that we get when cross compiling for aarch64 (mostly are missing headers):
Beta Was this translation helpful? Give feedback.
All reactions