Bugzilla – Bug 3009
compile_commands.json is empty after compilation
Last modified: 2018-12-23 14:04:26 UTC
Created attachment 3207 [details] Patch to fix the issue The compile_commands.json file is empty after building ns-3. This happens both in ns-3.29 and in the current ns-3-dev (commit 0f7ceefcf5cc), and is caused by the fact that now waf by default sets Task.keep_last_cmd to False (this change was introduced in [1]), and relies on waf-tools/clang_compilation_database.py to set it to True. However, the code to set that variable as True is missing in the file. I guess in the last update to waf 2.0.9 waf-tools/clang_compilation_database.py was not updated. I've attached a patch with the required update to fix the issue. [1] https://gitlab.com/ita1024/waf/commit/7778868718333932708a3915825f5c3f4ac53341
Merged in, see https://gitlab.com/nsnam/ns-3-dev/merge_requests/5