Closed
Description
I use CMake and IAR ARM compiler to compile my code for an ARM processor. The CMake generates compile_commands.json and ccls knows the complete command line. I want ccls to support the IAR ARM compiler and can jump to the IAR ARM compiler header files.
The C runtime and compiler header files are installed in ../Config/exec/arm/inc/c, and __ICCARM__ is an internal preprocessor defined by the IAR ARM compiler.
Here is my .ccls file,
%compile_commands.json
-target
arm
-D__ICCARM__
-I../Config/exec/arm/inc/c
Now the problem is why macro __GNUC__ is defined with -target arm? If I remove -target arm in .ccls, then macro _MSC_VER will be defined. Is there a -target support the IAR ARM compiler? If no, how to set the configuration to not define any compiler macro like _MSC_VER and __GNUC__