Skip to content

Commit

Permalink
bazel: rename BUILD.wip to BUILD, some small Istio motivated build ru…
Browse files Browse the repository at this point in the history
…le changes. (envoyproxy#663)

This patch takes us to the point where we can do a Bazel build of Envoy with:

bazel build //source/exe:envoy-static

and run tests with:

bazel test //test/...

Further user documentation will be supplied in followup patches. The Docker CI support is also
missing, as the WORKSPACE and ci/prebuilt/BUILD rules need some updating.

Other projects that consume Envoy and have a Bazel build should also be able to benefit from the
BUILD files, e.g. Istio.
  • Loading branch information
htuch authored and vijayendrabvs committed Apr 4, 2017
1 parent 82b439a commit 8c61ea2
Show file tree
Hide file tree
Showing 127 changed files with 24 additions and 19 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/ci/bazel-*
/ci/prebuilt/thirdparty
/ci/prebuilt/thirdparty_build
BUILD
cscope.*
BROWSE
.deps
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion bazel/envoy_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def envoy_cc_library(name,
def envoy_cc_binary(name,
srcs = [],
data = [],
linkstatic = 0,
visibility = None,
deps = []):
native.cc_binary(
name = name,
Expand All @@ -66,7 +68,8 @@ def envoy_cc_binary(name,
"-pthread",
"-lrt",
],
linkstatic = 1,
linkstatic = linkstatic,
visibility = visibility,
deps = deps + [
"//source/precompiled:precompiled_includes",
],
Expand Down
7 changes: 0 additions & 7 deletions bazel/sync-from-wip.sh

This file was deleted.

8 changes: 0 additions & 8 deletions bazel/sync-to-wip.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 20 additions & 2 deletions source/exe/BUILD.wip → source/exe/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ load("//bazel:envoy_build_system.bzl", "envoy_cc_library", "envoy_cc_binary")

envoy_cc_binary(
name = "envoy",
srcs = ["main.cc"],
deps = ["envoy_main_lib"],
)

envoy_cc_binary(
name = "envoy-static",
linkstatic = 1,
deps = ["envoy_main_lib"],
)

envoy_cc_library(
name = "envoy_common_lib",
deps = [
":hot_restart_lib",
"//source/common/event:libevent_lib",
"//source/common/local_info:local_info_lib",
"//source/common/network:utility_lib",
Expand All @@ -33,6 +42,15 @@ envoy_cc_binary(
],
)

envoy_cc_library(
name = "envoy_main_lib",
srcs = ["main.cc"],
deps = [
":envoy_common_lib",
":hot_restart_lib",
],
)

envoy_cc_library(
name = "hot_restart_lib",
srcs = ["hot_restart.cc"],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8c61ea2

Please sign in to comment.