mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
Adding compilation_db to panda builds (#1828)
This commit is contained in:
@@ -101,7 +101,8 @@ def build_project(project_name, project, extra_flags):
|
||||
ASCOM="$AS $ASFLAGS -o $TARGET -c $SOURCES",
|
||||
BUILDERS={
|
||||
'Objcopy': Builder(generator=objcopy, suffix='.bin', src_suffix='.elf')
|
||||
}
|
||||
},
|
||||
tools=["default", "compilation_db"],
|
||||
)
|
||||
|
||||
startup = env.Object(f"obj/startup_{project_name}", project["STARTUP_FILE"])
|
||||
|
||||
12
SConstruct
12
SConstruct
@@ -12,5 +12,17 @@ AddOption('--coverage',
|
||||
action='store_true',
|
||||
help='build with test coverage options')
|
||||
|
||||
AddOption('--compile_db',
|
||||
action='store_true',
|
||||
help='build clang compilation database')
|
||||
|
||||
env = Environment(
|
||||
COMPILATIONDB_USE_ABSPATH=True,
|
||||
tools=["default", "compilation_db"],
|
||||
)
|
||||
|
||||
if GetOption('compile_db'):
|
||||
env.CompilationDatabase("compile_commands.json")
|
||||
|
||||
# panda fw & test files
|
||||
SConscript('SConscript')
|
||||
|
||||
Reference in New Issue
Block a user