Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions etc/bazel-make-compilation-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ done >> compile_flags.txt
# Qt include files check for this
echo '-fPIC' >> compile_flags.txt

# Python include bindings.
for f in bazel-out/../../../external/*/include/python3.*/Python.h; do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bazel-out/.. is a no-op, what is the intention in including it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

bazel-out/ is a symlink that points to the bazel internal directories.

if [ -f "${f}" ]; then
PY_INC="$(dirname "${f}")"
echo "-I${PY_INC}"
echo "-I$(realpath "${PY_INC}")" # work around clangd bug
break
fi
done >> compile_flags.txt

# Since we don't do per-file define extraction in compile_flag.txt,
# add them here globally
cat >> compile_flags.txt <<EOF
Expand Down