Skip to content

Warning about different compile db: check multiple directories.#10067

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
hzeller:feature-20260407-warn-compdb
Apr 7, 2026
Merged

Warning about different compile db: check multiple directories.#10067
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
hzeller:feature-20260407-warn-compdb

Conversation

@hzeller

@hzeller hzeller commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

When creating a compilation db for bazel, but there is still another compile db from cmake (e.g. from some previous build with cmake), then tools might not choose the intended one.

There was a warning already emitted for that case, but only for the toplevel directory not if it was in build/. Make this for both of these.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the bazel-make-compilation-db.sh script to check for existing compile_commands.json files in both the root and build/ directories, warning the user of potential interference with compile_flags.txt. Feedback suggests improving the robustness of the warning message by using the %s format specifier in printf to handle special characters in file paths and redirecting the output to stderr to ensure visibility.

Comment thread etc/bazel-make-compilation-db.sh Outdated
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

When creating a compilation db for bazel, but there is still
another compile db from cmake (e.g. from some previous build with
cmake), then tools might not choose the intended one.

There was a warning already emitted for that case, but only
for the toplevel directory not if it was in build/. Make this
for both of these.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@hzeller hzeller force-pushed the feature-20260407-warn-compdb branch from 13914b6 to d206b37 Compare April 7, 2026 08:47
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty maliberty merged commit 4065d54 into The-OpenROAD-Project:master Apr 7, 2026
15 checks passed
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