From ac8d75503a94bb8ab0656592dc9bd22e3ff817bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20No=C3=A9?= Date: Mon, 24 Apr 2017 16:43:26 -0400 Subject: [PATCH 1/2] External Deps: Add 'Backward' backtrace library. This adds github:bombela/backward-cpp as an external dependency. It is covered under the MIT license. This PR is a pre-requisite for a second PR which uses this feature within Envoy. This PR needs to be merged first for the CI image to include the external dependency. --- bazel/target_recipes.bzl | 1 + ci/build_container/build_recipes/backward.sh | 7 +++++++ ci/prebuilt/BUILD | 6 ++++++ docs/install/requirements.rst | 1 + 4 files changed, 15 insertions(+) create mode 100644 ci/build_container/build_recipes/backward.sh diff --git a/bazel/target_recipes.bzl b/bazel/target_recipes.bzl index 111348f623ac8..bc53766c63d0a 100644 --- a/bazel/target_recipes.bzl +++ b/bazel/target_recipes.bzl @@ -3,6 +3,7 @@ # ci/build_container/build_recipes. TARGET_RECIPES = { "ares": "cares", + "backward": "backward", # TODO(htuch): Remove when cmake goes. "cotire": "cotire", "event": "libevent", diff --git a/ci/build_container/build_recipes/backward.sh b/ci/build_container/build_recipes/backward.sh new file mode 100644 index 0000000000000..814b28ef8140e --- /dev/null +++ b/ci/build_container/build_recipes/backward.sh @@ -0,0 +1,7 @@ +set -e + +git clone https://github.com/bombela/backward-cpp.git +cd backward-cpp +# v1.3 release +git reset --hard cd1c4bd9e48afe812a0e996d335298c455afcd92 +cp backward.hpp $THIRDPARTY_BUILD/include diff --git a/ci/prebuilt/BUILD b/ci/prebuilt/BUILD index fa02d6a4a5bee..4d69469d1542f 100644 --- a/ci/prebuilt/BUILD +++ b/ci/prebuilt/BUILD @@ -7,6 +7,12 @@ cc_library( includes = ["thirdparty_build/include"], ) +cc_library( + name = "backward", + hdrs = glob(["thirdparty_build/include/*.hpp"]), + includes = ["thirdparty_build/include"], +) + cc_library( name = "crypto", srcs = ["thirdparty_build/lib/libcrypto.a"], diff --git a/docs/install/requirements.rst b/docs/install/requirements.rst index 7063f25f5152e..20b690116915b 100644 --- a/docs/install/requirements.rst +++ b/docs/install/requirements.rst @@ -21,6 +21,7 @@ Envoy has the following requirements: * `lightstep-tracer-cpp `_ (last tested with 0.36) * `rapidjson `_ (last tested with 1.1.0) * `c-ares `_ (last tested with 1.12.0) +* `backward `_ (last tested with 1.3) In order to compile and run the tests the following is required: From 43503c1ce30219003d7e501df82f76d8b8f4f65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20No=C3=A9?= Date: Mon, 24 Apr 2017 17:14:36 -0400 Subject: [PATCH 2/2] Eliminate glob. --- ci/prebuilt/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/prebuilt/BUILD b/ci/prebuilt/BUILD index 4d69469d1542f..53dc4ff4b374c 100644 --- a/ci/prebuilt/BUILD +++ b/ci/prebuilt/BUILD @@ -9,7 +9,7 @@ cc_library( cc_library( name = "backward", - hdrs = glob(["thirdparty_build/include/*.hpp"]), + hdrs = ["thirdparty_build/include/backward.hpp"], includes = ["thirdparty_build/include"], )