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

Add support for configuration with clang-cl version 7 or older that don't support /clang: arguments #10624

Closed
sean-mcmanus opened this issue Mar 2, 2023 · 5 comments
Labels
enhancement Improvement to an existing feature Feature: Configuration An issue related to configuring the extension or IntelliSense Language Service more votes needed Issues that have been postponed until more community members upvote it
Milestone

Comments

@sean-mcmanus
Copy link
Contributor

See the thread at #10529 (comment)

@sean-mcmanus sean-mcmanus added Language Service Feature: Configuration An issue related to configuring the extension or IntelliSense enhancement Improvement to an existing feature labels Mar 2, 2023
@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Mar 2, 2023

Unfortunately, this appears to be unsupportable -- unless someone knows of an equivalent of /clang: with clang 7, which there doesn't appear. to be.

However, you should be able to workaround the issue by setting your compilerPath in c_cpp_properties.json to a clang-cl 8 or newer compiler. Your code would still be built with clang 7 (and compile_commands.json would still reference that version of clang-cl), but setting that compilerPath will enable us to be query that compiler correctly....assuming there isn't some other issue.

@sean-mcmanus sean-mcmanus closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2023
@Colengms
Copy link
Contributor

Colengms commented Mar 2, 2023

We use /clang: to pass-through down a couple gcc-like args to get the compiler to output its system includes and system defines. So what we're blocked on here is some/any way to query system includes and system defines from. Without that capability, the compiler path is not useful to us, and the user would have to add system includes and defines to their c_cpp_properties.json configuration directly, as well as set the IntelliSenseMode.

@emptyVoid
Copy link

@sean-mcmanus @Colengms
The following command yields the same output in version 7.0.0 as does /clang:-E /clang:-dM nul in version 8.0.1:
"C:\Program Files (x86)\LLVM\bin\clang-cl.exe" -Xclang -E -Xclang -dM /E -c dummy.cpp
I couldn't find a way to feed nul as input though.

@Colengms
Copy link
Contributor

Colengms commented Mar 4, 2023

Reopening. It looks like it might be possible to make this work clang-cl 7 with -Xclang instead of /clang:.  Some of the GGC args we need to pass in don't appear to be accepted by -Xclang, such as bitness args (-m32, -m64) and compiler flags (clang:-fno-blocks). And it doesn't accept nul or /dev/null output, so we would need to create a dummy source to compile, in a directory we can write to.

@Colengms Colengms reopened this Mar 4, 2023
@Colengms Colengms removed the wontfix label Mar 4, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.

@github-actions github-actions bot added the more votes needed Issues that have been postponed until more community members upvote it label May 3, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
@github-actions github-actions bot added this to the Triage milestone May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature Feature: Configuration An issue related to configuring the extension or IntelliSense Language Service more votes needed Issues that have been postponed until more community members upvote it
Projects
None yet
Development

No branches or pull requests

3 participants