Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions bazel/envoy_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ def envoy_include_prefix(path):
return '/'.join(path.split('/')[1:])
return None

# Envoy C++ library targets that need no transformations or additional dependencies before being
# passed to cc_library should be specified with this function. Note: this exists to ensure that
# all envoy targets pass through an envoy-declared skylark function where they can be modified
# before being passed to a native bazel function.
def basic_envoy_cc_library(name, **kargs):

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.

Nit: prefer envoy_basic_cc_library, since all other macros we provide are envoy_ prefixed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. Will update.

native.cc_library(name = name, **kwargs)

# Envoy C++ library targets should be specified with this function.
def envoy_cc_library(name,
srcs = [],
Expand Down
2 changes: 1 addition & 1 deletion include/envoy/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load(

envoy_package()

cc_library(
basic_envoy_cc_library(
name = "base_includes",
hdrs = [
"exception.h",
Expand Down
2 changes: 1 addition & 1 deletion test/test_common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load(

envoy_package()

cc_library(
basic_envoy_cc_library(
name = "printers_includes",
hdrs = ["printers.h"],
)
Expand Down