Breaking changes to Envoy's build configuration

Skip to first unread message

Yan Avlasov

Jun 4, 2021, 10:59:28 AM6/4/21
to envoy-dev,
Hello Envoy developers,
To continue support for builds using the gcc toolchain we need to make some changes that unfortunately touch almost every source code file in the Envoy repository. The existing structure of include paths was not very bazel friendly and resulted in excessively long command lines breaking internals of gcc. See for more information.

As a result the following changes have been made in PR

  1. The content of the include directory has been moved up one level, eliminating the 'include/' prefix. All BUILD files have been updated to use '//envoy/...' instead of '//include/envoy/...' dependency paths.
  2. The include paths to headers in the 'source/' directory were updated to include the `source/' prefix in all C++ source files.

This has an understandable impact on developers of proprietary Envoy extensions. After you update the HEAD of the main branch, your Envoy extension may fail to build. To fix your build you may use the shell script below (which was used to fix the example filter repository) as a guide. Please contact #envoy-dev Slack channel or mailing list.


find . -name BUILD -print0 | xargs -0 sed -i 's/"@envoy\/\/include\//"@envoy\/\//g'

for dir in common docs exe extensions server
  find . \( -name \*.h -o -name \*.cc \) -print0 | xargs -0 sed -i "s/#include \"$dir\//#include \"source\/$dir\//g"

A lot of outstanding PRs in the Envoy repository will also be impacted with merge conflicts.We apologize for any inconvenience that this large scale refactor will cause.

Yan Avlasov on behalf of Envoy maintainers.
Reply all
Reply to author
0 new messages