Skip to content

Commit

Permalink
envoy_cc_library: add export of foo_with_external_headers (#8005)
Browse files Browse the repository at this point in the history
Add a parallel native.cc_library to envoy_cc_library
for external projects that consume Envoy's libraries. This allows the consuming
project to disambiguate overlapping include paths when repository overlaying is used,
as it can now include envoy headers via external/envoy/...

Risk Level: Low
Testing: N/A

Signed-off-by: Otto van der Schaaf <[email protected]>
  • Loading branch information
oschaaf authored and htuch committed Aug 22, 2019
1 parent f12adac commit 797d58f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bazel/envoy_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ def envoy_cc_library(
strip_include_prefix = strip_include_prefix,
)

# Intended for usage by external consumers. This allows them to disambiguate
# include paths via `external/envoy...`
native.cc_library(
name = name + "_with_external_headers",
hdrs = hdrs,
copts = envoy_copts(repository) + copts,
visibility = visibility,
deps = [":" + name],
strip_include_prefix = strip_include_prefix,
)

# Used to specify a library that only builds on POSIX
def envoy_cc_posix_library(name, srcs = [], hdrs = [], **kargs):
envoy_cc_library(
Expand Down

0 comments on commit 797d58f

Please sign in to comment.