Open wonk-andy opened 3 weeks ago
Hey Andy,
The compilation database is capturing the compiler calls only. Compiler internals are not presented in the output.
Compiler specific variables are not easy to mimic with other compilers. OS specific defines can be placed into a common header, but might interfere with the host header files.
I am trying to use Bear 3.1.4 to generate the compile_commands.json file from a Makefile based project which cross compiles for QNX on a Linux host. The compile command line for one of the source files is:
aarch64-unknown-nto-qnx7.0.0-gcc -std=gnu99 -MMD -MP -Iinclude -o build/1.01.00/src/iMX8.o -c src/iMX8.c
The output for this file that is captured says:
There are other built-in compiler options that it isn't capturing, for example the compiler defines
__QNX__
which is used for conditional compilation within the source files. How do I capture this, and any other, built in variable?-Andy.