-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support for generic GCC toolchains #6798
Comments
Similar to #3222 . |
Also related to #4653 |
yes we need it |
@heartacker Please upvote this issue so it can be considered. |
This feature request has received enough votes to be added to our backlog. |
@longnguyen2004 Are you still seeing this issue with a recent version of the extension? I believe 1.2.0-insiders included a change which caused us to give up on compilers that did not successfully return defaults from a simple query without any additional config args. We had to revert that change, as some compilers are unable to provide defaults without additional args. Based on the log output, I see that we were failing to query avr-gcc as well as llvm-mingw gcc. If that is still an issue in a recent version, it would seem to be due to those compilers diverging from the output format we usually see when querying gcc compilers. We would need to investigate and add support for compilers with unique output, on a per-compiler basis. Since support for an agnostic IntelliSense mode is tracked by #4653 , we could repurpose this issue to track adding support for avr-gcc, specifically. |
Although IntelliSense still doesn't recognize the
I think all we need is a generic gcc/clang mode that disables the target and bitness detection, and it's good to go.
|
I'm not sure if this is related, but we use clang's --gcc-toolchain option to specify a replacement for sysroot includes (which are very old in our env). compile_commands.json reflects this option (and I see it printed in log-diagnostics under the command entry), but the includes listed still include the default system includes instead. I tried adding the --gcc-toolchain option to the configuration as a compiler argument as well, but it has no effect either. |
Type: LanguageService
Describe the bug
Many different embedded platforms use GCC as their compiler. This presents a problem for the extension, since it only supports x86, x64, arm and arm64, while there are many embedded platforms (just to name a few: AVR and ESP32). It's impossible to keep track of them all, so we should create a generic GCC target, which will only do the minimal things to get IntelliSense working (get C and C++ standards, get include folders, get predefined macros, etc.)
Steps to reproduce
Create a C++ configuration with a compiler that targets an embedded platform.
Expected behavior
Proper IntelliSense for embedded toolchains.
Logs
Screenshots
Unable to locate avr include files because the default include paths aren't set up properly:
![image](https://user-images.githubusercontent.com/15729831/104797424-7ca6b600-57f0-11eb-8884-3142185c8a92.png)
Additional context
Default search paths for
avr-gcc
:The include paths are there, but the extension isn't grabbing it.
The text was updated successfully, but these errors were encountered: