-
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
Add support for armcc compiler #6677
Comments
Thanks for the info on armcc. This sounds like a duplicate of #4269 . |
I'm sorry, I forgot I had already opened a similar issue. Anyway, I think we may close that one and leave this opened, because I updated my settings in order to use just the Please let me know if I did well. Thanks |
Any news about this? Do you have any workaround? It doesn't seem possible to manually override compilerPath when using CMake Tools... any idea? @sean-mcmanus @bobbrow Thanks |
Yeah, there isn't a way to override the compilerPath with CMake Tools. Looks like this issue is being tracked in CMake Tools at microsoft/vscode-cmake-tools#1096 and the recommended workaround is to use compileCommands, which allows the compilerPath to be overwritten. |
Thank you for the info @sean-mcmanus And to override just system include paths and defines (ignoring error on compilerPath), instead? Not possible either? |
If the configurationProvider is set, then our extension will use the includePath/defines from the configuration provider and there's not currently an override mechanism, other than modifying the open source code to allow such an override. |
Hi @gentooise . Could you set
I'm curious which of these fail. If the issue is only that the result of -dumpmachine is not recognized, that would be relatively simple to fix. Or, the issue may be with how to compose one of the other command lines. |
I have the same problem using the WindRiver compiler.
First part of output
|
@gerhardol Your issue should be fixed in our pending 1.2.1 release (there was a bug querying Cygwin compilers). |
Thanks, but it is WindRiver that is the compiler that should be used, not detected. |
Hi @gerhardol . Currently, we support compiler paths that refers to cl.exe, gcc, or a gcc variant (such as clang). If using another compiler, I'd suggest specifying a |
Hi @gerhardol . FYI, I just opened the following issue related to what I described in my last comment. #6909 Until that is addressed, there doesn't seem to be a way to directly provide the system includes and system defines that we are missing, when using |
Thanks With 1.2.1 there should be a way to use Cygwin - maybe MSVC could be used right now. (adding c_cpp_properties.json, but 1.2.1 is probably released before I am done.) We do not have any compilerpath set at all, CMake Tools is set as the configuration provider with a CMake Toolchain file. That fails maybe as no include system paths are provided. Maybe there are other issues too, I found the following: #3819 microsoft/vscode-cmake-tools#702 I am not sure what supplying the compiler settings from CMake Tools really means here, if CPP Tools still tries to query the files then there is no point in supplying that for unsupported compilers. While ARMCC 5 is based on GCC, the arguments are slightly different I believe and it may not work (could be similar for ARMCC 6). The other embedded compilers may not work at all. compile_commands.json is therefore used as a backup. compile_commands.json requires that CMake configuration has run, which we would like to avoid as source code generation can take a long time. But it is acceptable if CMake Tools do not provide the information and #6909 may be a workaround for the problem reported in this PR too. |
Hi @gerhardol . 1.2.1 will contain a fix to allow using an explicitly blank If we are not able to query a compiler, a custom config provider or Another idea might be to create a script or custom binary to use as an proxy compiler, that either passes all command lines through to the actual compiler, or responds to our compiler-querying command lines with system includes and system defines in the format we expect from gcc. I also opened #6931 to track providing a way users could add support for compilers we don't know about. |
Thanks for the info I am partly hijacking this issue now, but the OP and me seem to have misunderstood what a custom provider actually provides to CPP Tools. I had the impression that CPP Tools would not need to query any data with that, but that is clearly not the case. This should maybe be clarified in the documentation - if the pending outcome of this discussion is included, it would be even better. (To put this in another way: How to write the doc so users do not ask stupid questions.)
|
Hi @gerhardol . If a config provider can provide all of the system includes and defines, that is supported. A custom config provider implemented to support a specific build system and specific compiler(s) could do this. However, if the config provider supports multiple compilers and does not have deep knowledge of those compilers (such as the case with CMake Tools), then it would have to do the same work cpptools would have to do, to query compilers for this information. CMake Tools essentially defers that work to cpptools. We also parse the args of the command line to infer user includes, user defines, and check for args that override settings (such as for language standard, target platform and bitness). If the compiler is unknown to us, it's possible the command line syntax is unknown to us also. I don't think we have a way to fully support compilers that are unknown to us. #6909 would fall short, as it does not address how to parse the command line for user includes, defines, etc.. It looks like #6931 would seem to speak to the more general problem. |
I have the same problem with
|
I'm a bit confused right now and not sure which issue is the correct one to post to, I'm just pretty certain, that I don't need to open another one. The current solution is to provide all defines and include paths in It is a bit ugly to maintain the include paths and defines in several places, so after moving to CMake, I tried using the So #6909 sounds like it would provide a solution for this, but #6931 would also provide a (more general) solution. A colleague wrote a small utility to fake the compiler query output, but that has no interface to CMake, so suffers from the same drawbacks as writing everything manually in |
Hi all, I'm glad this issue received a lot of visibility. I would live well with #6909 solution in the meantime, but I'm really hoping for something like the proposal in #6931: that would be great. Anyway, just to reply to @Colengms:
here's your output (private paths omitted):
If you need, I can query armcc compiler by hand with any command you like and provide the output to you. |
This feature request is being closed due to insufficient upvotes. When enough upvotes are received, this issue will be eligible for our backlog. |
This feature request has received enough votes to be added to our backlog. |
Type: LanguageService
I'm using CMake Tools extension as
configurationProvider
for cpptools, CMake files are correctly parsed and ARM Compiler toolchain is selected (via my Toolchain.cmake file).However, it seems cpptools extension does not support ARM Compiler.
This is ARM Compiler -> link (it's proprietary ARM compiler, a license is needed to use the compiler, but I could provide whatever compiler output you may need).
Describe the bug
After configuration has been provided via CMake Tools, cpptools gives the following C/C++ Configuration Warning:
The path to ARM Compiler is correct, the executable is there.
Steps to reproduce
You cannot reproduce without an active ARM Compiler license.
Expected behavior
C/C++ extension also supports ARM proprietary compilers.
Logs
Screenshots
Additional context
Here you can find more details about compiler defines/includes. (I already supported a similar work for an Eclipse IDE plugin some time ago).
Quotes from above link:
The text was updated successfully, but these errors were encountered: