From 897e738e626f528618ff3c2f97e67767d2644fdf Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 26 May 2020 18:55:24 -0700 Subject: [ci skip] Add initial section for Users Guide misc section for compilation database --- doc/user/misc.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/doc/user/misc.xml b/doc/user/misc.xml index b093629..f2531b6 100644 --- a/doc/user/misc.xml +++ b/doc/user/misc.xml @@ -675,4 +675,46 @@ env.Command('directory_build_info', +
+ Creating LLVM Compilation Database + + + + LLVM has defined a JSON Compilation Database Format. This file is in common use as input into LLVM tools and many IDE's and editors as well. + + + See JSON Compilation Database Format Specification¶ for complete information + + + + + Currently SCons supports two variations. One is to output source and target files with paths relative to the top of the SCons build, or to output those files with their absolute path. + + This is controlled by COMPILATIONDB_USE_ABSPATH=(True|False) + + Example of absolute paths for target and source + +[ + { + "command": "gcc -o test_main.o -c test_main.c", + "directory": "/home/user/sandbox", + "file": "/home/user/sandbox/test_main.c", + "target": "/home/user/sandbox/test_main.o" + } +] + + Example of relative paths for target and source + + +[ + { + "command": "gcc -o test_main.o -c test_main.c", + "directory": "/home/user/sandbox", + "file": "test_main.c", + "target": "test_main.o" + } +] + + +
-- cgit v0.12