Skip to content
Merged
Show file tree
Hide file tree
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
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 envoy_basic_cc_library(name, **kargs):
native.cc_library(name = name, **kargs)

# Envoy C++ library targets should be specified with this function.
def envoy_cc_library(name,
srcs = [],
Expand Down
3 changes: 2 additions & 1 deletion include/envoy/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ licenses(["notice"]) # Apache 2
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_library",
"envoy_basic_cc_library",
"envoy_package",
)

envoy_package()

cc_library(
envoy_basic_cc_library(
name = "base_includes",
hdrs = [
"exception.h",
Expand Down
3 changes: 2 additions & 1 deletion test/test_common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ licenses(["notice"]) # Apache 2
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_library",
"envoy_basic_cc_library",
"envoy_cc_test_library",
"envoy_package",
)

envoy_package()

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