Skip to content

Commit

Permalink
build: BUILD file changes necessary for #3892 (#3909)
Browse files Browse the repository at this point in the history
As requested in #3892, breaking the BUILD file changes out into a separate PR

Risk Level:
Low
Testing:
bazel build //source/exe:envoy-static and bazel test //test/... on Linux
Docs Changes:
None
Release Notes:
None

Signed-off-by: Sam Smith <sesmith177@gmail.com>
  • Loading branch information
sesmith177 authored and htuch committed Jul 26, 2018
1 parent 3ee3aa3 commit 9b64f4b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
@@ -1,6 +1,6 @@
references:
envoy-build-image: &envoy-build-image
envoyproxy/envoy-build:18cdf0f806b66bef60ee64248352a8b3bc4ace7d
envoyproxy/envoy-build:1ef23d481a4701ad4a414d1ef98036bd2ed322e7

version: 2
jobs:
Expand Down
10 changes: 0 additions & 10 deletions bazel/envoy_build_system.bzl
Expand Up @@ -144,13 +144,6 @@ def tcmalloc_external_deps(repository):
"//conditions:default": [envoy_external_dep_path("tcmalloc_and_profiler")],
})

# Dependencies on libevent should be wrapped with this function.
def libevent_external_deps(repository):
return [envoy_external_dep_path("event")] + select({
repository + "//bazel:windows_x86_64": [],
"//conditions:default": [envoy_external_dep_path("event_pthreads")],
})

# Transform the package path (e.g. include/envoy/common) into a path for
# exporting the package headers at (e.g. envoy/common). Source files can then
# include using this path scheme (e.g. #include "envoy/common/time.h").
Expand All @@ -175,16 +168,13 @@ def envoy_cc_library(
visibility = None,
external_deps = [],
tcmalloc_dep = None,
libevent_dep = None,
repository = "",
linkstamp = None,
tags = [],
deps = [],
strip_include_prefix = None):
if tcmalloc_dep:
deps += tcmalloc_external_deps(repository)
if libevent_dep:
deps += libevent_external_deps(repository)

native.cc_library(
name = name,
Expand Down
1 change: 0 additions & 1 deletion bazel/target_recipes.bzl
Expand Up @@ -5,7 +5,6 @@ TARGET_RECIPES = {
"ares": "cares",
"benchmark": "benchmark",
"event": "libevent",
"event_pthreads": "libevent",
"tcmalloc_and_profiler": "gperftools",
"luajit": "luajit",
"nghttp2": "nghttp2",
Expand Down
10 changes: 0 additions & 10 deletions ci/prebuilt/BUILD
Expand Up @@ -37,16 +37,6 @@ cc_library(
includes = ["thirdparty_build/include"],
)

cc_library(
# TODO: Remove 'event_pthreads' once no BUIlD files use it
# glob here is due to the fact that ninja doesn't produce a libevent_pthreads.a file -
# all the symbols are included in libevent.a. This is a hack so that CI can pass before
# https://github.com/envoyproxy/envoy/pull/3909 is merged as well
name = "event_pthreads",
srcs = glob(["thirdparty_build/lib/libevent_pthreads.a"]),
deps = [":event"],
)

cc_library(
name = "luajit",
srcs = select({
Expand Down
8 changes: 6 additions & 2 deletions source/common/event/BUILD
Expand Up @@ -57,7 +57,9 @@ envoy_cc_library(
name = "libevent_lib",
srcs = ["libevent.cc"],
hdrs = ["libevent.h"],
libevent_dep = 1,
external_deps = [
"event",
],
deps = [
"//source/common/common:assert_lib",
"//source/common/common:c_smart_ptr_lib",
Expand All @@ -68,7 +70,9 @@ envoy_cc_library(
name = "dispatched_thread_lib",
srcs = ["dispatched_thread.cc"],
hdrs = ["dispatched_thread.h"],
libevent_dep = 1,
external_deps = [
"event",
],
deps = [
":dispatcher_lib",
"//include/envoy/event:dispatcher_interface",
Expand Down
4 changes: 3 additions & 1 deletion source/common/filesystem/BUILD
Expand Up @@ -40,7 +40,9 @@ envoy_cc_library(
"inotify/watcher_impl.h",
],
}),
libevent_dep = 1,
external_deps = [
"event",
],
strip_include_prefix = select({
"@bazel_tools//tools/osx:darwin": "kqueue",
"//conditions:default": "inotify",
Expand Down

0 comments on commit 9b64f4b

Please sign in to comment.