microsoft / microsoft/vscode-cpptools
Add support for armcc compiler
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
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
- OS and Version: Windows 10
- VS Code Version: 1.52.0
- C/C++ Extension Version: v1.1.3
- Other extensions you installed (and if the issue persists after disabling them): CMake Tools
After configuration has been provided via CMake Tools, cpptools gives the following C/C++ Configuration Warning:
[17/12/2020, 09:34:04] Unable to resolve configuration with compilerPath "c:/program files (x86)/arm_compiler_5.06u4/bin64/armcc.exe". Using "cl.exe" instead.
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
Insert logs here.
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:
For built-in macros and includes, I provide here armcc case as an example:
Built-in macros are provided by the compiler with
armcc --list_macros dummy.c(dummy.ccan be empty). I could just feed your Parser with this command, whose output is like the following:#define __STDC__ 1 #define __STDC_VERSION__ 199409L #define __EDG__ 1 #define __EDG_VERSION__ 407 #define __EDG_SIZE_TYPE__ unsigned int #define __EDG_PTRDIFF_TYPE__ int #define __sizeof_int 4 #define __sizeof_long 4 #define __sizeof_ptr 4 #define __ARMCC_VERSION 5060422 #define __TARGET_CPU_ARM7TDMI 1 #define __TARGET_FPU_SOFTVFP 1 #define __CC_ARM 1 #define __arm 1 #define __arm__ 1 #define __TARGET_ARCH_4T 1 #define __TARGET_ARCH_ARM 4 #define __TARGET_ARCH_THUMB 1 #define __TARGET_ARCH_A64 0 #define __TARGET_ARCH_AARCH32 1 #define __TARGET_FEATURE_HALFWORD 1 #define __TARGET_FEATURE_THUMB 1 #define __TARGET_FEATURE_MULTIPLY 1 #define __TARGET_FEATURE_EXTENSION_REGISTER_COUNT 0 #define __a32__ 1 #define __OPTIMISE_SPACE 1 #define __OPT_SMALL_ASSERT 1 #define __OPTIMISE_LEVEL 2 #define __SOFTFP__ 1There is no armcc command line argument to get the list of include directories. The only include directory is fixed, and it is simply
../include(relative to the location of armcc executable). I could feed your Built-in parser with this path.
Luckily, I see that everything seems well documented. You can find all info starting from the link to the docs I provided above. Moreover, I can suggest other specific links of interests (you can easily find them navigating through docs by yourself):
- Link to Compiler command-line options and search paths (you can also see
../includethere);- Link to Factors influencing how the compiler searches for header files;
- Link to Compiler search rules and the current place;
- Link to The ARMCC5INC environment variable.
Additionally, I want to point out that I'm using version 5 of the ARM compiler, but there is version 6 also. With version 6, ARM seems to switch to clang-compatible compiler. I provide also a link to version 6 command line options here.
Here in section 1.1 Support level definitions they say:
Arm Compiler 6 is built on LLVM technology and preserves the functionality of that technology where possible. This means that there are additional features available in Arm Compiler that are not listed in the documentation. These additional features are known as community features. For information on these community features, see the documentation for the Clang/LLVM project.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla gestione dei percorsi di configuration-provider per il compilerPath segnalato, c:/program files (x86)/arm_compiler_5.06u4/bin64/armcc.exe, e il fallback a cl.exe. Usa l'output fornito di armcc --list_macros dummy.c e il percorso ../include relativo al compilatore come input attesi, quindi verifica che la configurazione di CMake Tools non produca più l'avviso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cmake, cpp
- Ambito
- build-system, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100