File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import sys
3
3
import rtconfig
4
+ import scons_compiledb
4
5
5
6
from rtconfig import RTT_ROOT
6
7
@@ -11,13 +12,17 @@ TARGET = 'rtthread.' + rtconfig.TARGET_EXT
11
12
12
13
DefaultEnvironment (tools = [])
13
14
env = Environment (tools = ['mingw' ],
15
+ COMPILATIONDB_USE_ABSPATH = True ,
14
16
AS = rtconfig .AS , ASFLAGS = rtconfig .AFLAGS ,
15
17
CC = rtconfig .CC , CCFLAGS = rtconfig .CFLAGS ,
16
18
CXX = rtconfig .CXX , CXXFLAGS = rtconfig .CXXFLAGS ,
17
19
AR = rtconfig .AR , ARFLAGS = '-rc' ,
18
20
LINK = rtconfig .LINK , LINKFLAGS = rtconfig .LFLAGS )
19
21
env .PrependENVPath ('PATH' , rtconfig .EXEC_PATH )
20
22
env ['ASCOM' ] = env ['ASPPCOM' ]
23
+ env .Tool ('compilation_db' )
24
+ cdb = env .CompilationDatabase ('compile_commands.json' )
25
+ Alias ('cdb' , cdb )
21
26
22
27
Export ('RTT_ROOT' )
23
28
Export ('rtconfig' )
You can’t perform that action at this time.
0 commit comments