Tell compilation db where to find the Python.h includes.#9506
Tell compilation db where to find the Python.h includes.#9506hzeller wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
The pull request correctly identifies the need to include Python headers in the compilation database to resolve clang-tidy diagnostics. The proposed solution adds the necessary -I flags, but the implementation using dirname on a glob is fragile. I have suggested a more robust loop-based approach that also includes realpath for better compatibility with tools like clangd.
|
clang-tidy review says "All clean, LGTM! 👍" |
989ed7c to
c5ce15f
Compare
There was one diagnostic error when running clang-tidy that was due to not finding Python.h. Add it to the `-I` paths. Signed-off-by: Henner Zeller <h.zeller@acm.org>
c5ce15f to
9760cb0
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
| echo '-fPIC' >> compile_flags.txt | ||
|
|
||
| # Python include bindings. | ||
| for f in bazel-out/../../../external/*/include/python3.*/Python.h; do |
There was a problem hiding this comment.
bazel-out/.. is a no-op, what is the intention in including it?
There was a problem hiding this comment.
bazel-out/ is a symlink that points to the bazel internal directories.
There was one diagnostic error when running clang-tidy that was due to not finding Python.h. Add it to the
-Ipaths.