If building a target with eg.:
env.Library("foo", ["foo.cpp"], CXXFLAGS=["-Dfoo"])
The compile command written to the compilation command database (compile_commands.json) will not use the updated flags in CXXFLAGS, but always use the environment in "env".
This means that the compilation database will not always match the actual command line required to build the target.
- links to