Skip to content

Commit 0108cfb

Browse files
committed
Add tool to generate compile_commands.json for bsp qemu-virt64-riscv
1 parent fa2d07e commit 0108cfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bsp/qemu-virt64-riscv/SConstruct

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1111

1212
DefaultEnvironment(tools=[])
1313
env = Environment(tools = ['mingw'],
14+
COMPILATIONDB_USE_ABSPATH = True,
1415
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
1516
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
1617
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
1718
AR = rtconfig.AR, ARFLAGS = '-rc',
1819
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
1920
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
2021
env['ASCOM'] = env['ASPPCOM']
22+
env.Tool('compilation_db')
23+
cdb = env.CompilationDatabase('compile_commands.json')
24+
Alias('cdb', cdb)
2125

2226
Export('RTT_ROOT')
2327
Export('rtconfig')

0 commit comments

Comments
 (0)