From dc30886d1844f6e1783aa4743db2ef36c05d1101 Mon Sep 17 00:00:00 2001 From: Sam Smith Date: Thu, 19 Jul 2018 17:17:45 -0400 Subject: [PATCH 1/3] BUILD file changes necessary for #3892 Splitting this into two PRs to pass CI Signed-off-by: Sam Smith --- bazel/target_recipes.bzl | 1 - ci/prebuilt/BUILD | 6 ------ source/common/event/BUILD | 2 -- 3 files changed, 9 deletions(-) diff --git a/bazel/target_recipes.bzl b/bazel/target_recipes.bzl index 002780148a4e..626033688792 100644 --- a/bazel/target_recipes.bzl +++ b/bazel/target_recipes.bzl @@ -5,7 +5,6 @@ TARGET_RECIPES = { "ares": "cares", "benchmark": "benchmark", "event": "libevent", - "event_pthreads": "libevent", "tcmalloc_and_profiler": "gperftools", "luajit": "luajit", "nghttp2": "nghttp2", diff --git a/ci/prebuilt/BUILD b/ci/prebuilt/BUILD index 691644568905..658eccb3099e 100644 --- a/ci/prebuilt/BUILD +++ b/ci/prebuilt/BUILD @@ -23,12 +23,6 @@ cc_library( includes = ["thirdparty_build/include"], ) -cc_library( - name = "event_pthreads", - srcs = ["thirdparty_build/lib/libevent_pthreads.a"], - deps = [":event"], -) - cc_library( name = "luajit", srcs = ["thirdparty_build/lib/libluajit-5.1.a"], diff --git a/source/common/event/BUILD b/source/common/event/BUILD index 68420b3312b5..fe1eb52e3109 100644 --- a/source/common/event/BUILD +++ b/source/common/event/BUILD @@ -59,7 +59,6 @@ envoy_cc_library( hdrs = ["libevent.h"], external_deps = [ "event", - "event_pthreads", ], deps = [ "//source/common/common:assert_lib", @@ -73,7 +72,6 @@ envoy_cc_library( hdrs = ["dispatched_thread.h"], external_deps = [ "event", - "event_pthreads", ], deps = [ ":dispatcher_lib", From 4f7bc3872fb2ca98f270835ed3ba0682f89094e9 Mon Sep 17 00:00:00 2001 From: Akshat Gokhale Date: Wed, 25 Jul 2018 09:55:28 -0400 Subject: [PATCH 2/3] Remove libevent_dep This was an artifact from when livevent generated event.lib on Windows and libevent.a + libevent_pthreads.a on Linux. Since Linux now just has libevent.a, this is no longer needed Signed-off-by: Sam Smith Signed-off-by: Akshat Gokhale --- bazel/envoy_build_system.bzl | 10 ---------- source/common/filesystem/BUILD | 4 +++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/bazel/envoy_build_system.bzl b/bazel/envoy_build_system.bzl index e43460ccf202..9f79cdf88565 100644 --- a/bazel/envoy_build_system.bzl +++ b/bazel/envoy_build_system.bzl @@ -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"). @@ -175,7 +168,6 @@ def envoy_cc_library( visibility = None, external_deps = [], tcmalloc_dep = None, - libevent_dep = None, repository = "", linkstamp = None, tags = [], @@ -183,8 +175,6 @@ def envoy_cc_library( 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, diff --git a/source/common/filesystem/BUILD b/source/common/filesystem/BUILD index 1c2b286e07b5..f357a1295769 100644 --- a/source/common/filesystem/BUILD +++ b/source/common/filesystem/BUILD @@ -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", From 9fbcc1c83884af3278f226c19535a103a6ede6ed Mon Sep 17 00:00:00 2001 From: Akshat Gokhale Date: Wed, 25 Jul 2018 10:38:59 -0400 Subject: [PATCH 3/3] Bump build container image Picks up the new libevent.a that includes the symbols from the old libevent_pthreads.a Signed-off-by: Akshat Gokhale Signed-off-by: Sam Smith --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 31cb68053a67..5abbabeff266 100644 --- a/.circleci/config.yml +++ b/.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: