Linux command
sfdk-compiledb 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Generate a compile_commands.json
sfdk compiledb
Generate compilation database
sfdk build && sfdk compiledb
说明
sfdk compiledb generates a compile_commands.json compilation database for IDE integration and tooling. This file is used by clang-based tools, language servers, and IDEs to understand build flags, include paths, and compiler invocations for each source file. The command must be run after a successful build so that build logs are available to extract compilation commands from. It is part of the Sailfish SDK (sfdk) toolchain.
FAQ
What is the sfdk-compiledb command used for?
sfdk compiledb generates a compile_commands.json compilation database for IDE integration and tooling. This file is used by clang-based tools, language servers, and IDEs to understand build flags, include paths, and compiler invocations for each source file. The command must be run after a successful build so that build logs are available to extract compilation commands from. It is part of the Sailfish SDK (sfdk) toolchain.
How do I run a basic sfdk-compiledb example?
Run `sfdk compiledb` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more sfdk-compiledb examples?
This page includes 2 examples for sfdk-compiledb, plus related commands for nearby Linux tasks.