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

there is no task option for building the active file by clang/clang++ on windows? #5697

Closed
FischLu opened this issue Jun 25, 2020 · 4 comments
Labels
enhancement Improvement to an existing feature fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@FischLu
Copy link

FischLu commented Jun 25, 2020

I am using windows and msys2 + clang, I would like to compile my cpp code by clang++ in vscode. However, there is only three options when I create tasks with following step:
press F1 -> input tasks: configure default build task
then the popup window has only three options without clang.
image

Of course I can select g++ and modify it to use clang, but if there is an option, that would be perfect. Is there a way I can create a custom task template by myself? Thank you

@sean-mcmanus
Copy link
Contributor

Is your msys2 clang located in some default location? Is it at \msys64\mingw64\bin\? What's the exact compiler name? clang++.exe? We don't have msys + clang in our list of compilers to auto-detect, but we might be able to add it.

The workaround is to set your compilerPath to that msys2 clang -- that should cause it to be detected by our build task system.

@sean-mcmanus sean-mcmanus added enhancement Improvement to an existing feature Language Service more info needed The issue report is not actionable in its current state labels Jun 25, 2020
@FischLu
Copy link
Author

FischLu commented Jun 25, 2020

Thank you for the response. My clang locates in default location, more specifically "d:\msys64\mingw64\bin\clang.exe" and "d:\msys64\mingw64\bin\clang++.exe". The I have added "d:\msys64\mingw64\bin" into my environment PATH. After add clang path to compilerPath, I can select clang option now. Thank you.

@sean-mcmanus sean-mcmanus added quick fix and removed more info needed The issue report is not actionable in its current state labels Jun 26, 2020
@sean-mcmanus sean-mcmanus added this to the 0.29.0 milestone Jun 26, 2020
@sean-mcmanus
Copy link
Contributor

Thanks for the info. We've added the msys clang paths to our search paths for our next release (currently we only check for gcc/g++).

@sean-mcmanus sean-mcmanus self-assigned this Jun 26, 2020
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jun 29, 2020
@sean-mcmanus sean-mcmanus removed their assignment Jun 29, 2020
@sean-mcmanus
Copy link
Contributor

msys clang paths should be auto-discovered at their default locations with https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders2 .

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

2 participants