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 11import os
22import sys
33import rtconfig
4+ import scons_compiledb
45
56from rtconfig import RTT_ROOT
67
@@ -11,13 +12,17 @@ TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1112
1213DefaultEnvironment (tools = [])
1314env = Environment (tools = ['mingw' ],
15+ COMPILATIONDB_USE_ABSPATH = True ,
1416 AS = rtconfig .AS , ASFLAGS = rtconfig .AFLAGS ,
1517 CC = rtconfig .CC , CCFLAGS = rtconfig .CFLAGS ,
1618 CXX = rtconfig .CXX , CXXFLAGS = rtconfig .CXXFLAGS ,
1719 AR = rtconfig .AR , ARFLAGS = '-rc' ,
1820 LINK = rtconfig .LINK , LINKFLAGS = rtconfig .LFLAGS )
1921env .PrependENVPath ('PATH' , rtconfig .EXEC_PATH )
2022env ['ASCOM' ] = env ['ASPPCOM' ]
23+ env .Tool ('compilation_db' )
24+ cdb = env .CompilationDatabase ('compile_commands.json' )
25+ Alias ('cdb' , cdb )
2126
2227Export ('RTT_ROOT' )
2328Export ('rtconfig' )
You can’t perform that action at this time.
0 commit comments