Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ To force the Envoy build image to be refreshed by Docker you can set `ENVOY_DOCK
ENVOY_DOCKER_PULL=true ./ci/run_envoy_docker.sh <build_script_args>
```


# Generating compile commands

The `./ci/do_ci.sh` script provides a CI target that generates compile commands for clangd or other tools.

```bash
ENVOY_GEN_COMPDB_OPTIONS="--vscode --exclude_contrib" ./ci/do_ci.sh refresh_compdb
```

## On Linux

An example basic invocation to build a developer version of the Envoy static binary (using the Bazel `fastbuild` type) is:
Expand Down
10 changes: 9 additions & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,15 @@ case $CI_TARGET in
;;

refresh_compdb)
"${CURRENT_SCRIPT_DIR}/../tools/vscode/refresh_compdb.sh"
if [[ -z "${SKIP_PROTO_FORMAT}" ]]; then
"${CURRENT_SCRIPT_DIR}/../tools/proto_format/proto_format.sh" fix
fi

read -ra ENVOY_GEN_COMPDB_OPTIONS <<< "${ENVOY_GEN_COMPDB_OPTIONS:-}"
Comment thread
wbpcode marked this conversation as resolved.

"${CURRENT_SCRIPT_DIR}/../tools/gen_compilation_database.py" "${ENVOY_GEN_COMPDB_OPTIONS[@]}"
# Kill clangd to reload the compilation database
pkill clangd || :
;;

*)
Expand Down