Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: BUILD file changes necessary for #3892 #3909

Merged
merged 4 commits into from
Jul 26, 2018
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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