8000 Add support for generating clang compilation database by default by devtekve · Pull Request #2225 · commaai/panda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for generating clang compilation database by default #2225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

devtekve
Copy link
Contributor
@devtekve devtekve commented Jul 3, 2025

This brings the compilation_db functionality to panda, similar to what we already have in openpilot, which helps with IDE integration and code navigation.

This feature was originally introduced in openpilot via commaai/openpilot#19533 by @adeebshihadeh.

Previously, the behavior in panda required the --compile-db flag to generate compile_commands.json. We've now improved this:

What's changed

  • compile_commands.json is now always generated—no need to pass a flag.
  • Whether you build panda standalone or as part of openpilot, the compilation database is created automatically.

Behavior

  1. Standalone Build
    When building the panda project on its own, a compile_commands.json will be created in the panda/ folder containing only panda-related entries.

  2. Submodule in openpilot
    When panda is built as a submodule of openpilot, its entries will be added automatically to the top-level compile_commands.json in the openpilot root directory. This is achieved by configuring the build environment in panda/SConscript.

This ensures that both IDEs and code analysis tools work seamlessly across the full openpilot + panda codebase.

@devtekve devtekve changed the title Add support for generating clang compilation database Add support for generating clang compilation database by default Jul 3, 2025
@adeebshihadeh adeebshihadeh merged commit f849893 into commaai:master Jul 3, 2025
5 checks passed
@adeebshihadeh adeebshihadeh deleted the compilation-db branch July 3, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0