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

utility: add benchmark library, but don't use it yet. #2350

Merged
merged 7 commits into from
Jan 17, 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: 2 additions & 0 deletions bazel/envoy_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def envoy_cc_binary(name,
data = [],
testonly = 0,
visibility = None,
external_deps = [],
repository = "",
stamped = False,
deps = [],
Expand All @@ -172,6 +173,7 @@ def envoy_cc_binary(name,
if stamped:
_git_stamped_genrule(repository, name)
_git_stamped_genrule(repository, name + ".stripped")
deps = deps + [envoy_external_dep_path(dep) for dep in external_deps]
native.cc_binary(
name = name,
srcs = srcs,
Expand Down
4 changes: 2 additions & 2 deletions bazel/external/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ cc_library(
name = "all_external",
srcs = [":empty.cc"],
deps = [
"@io_opentracing_cpp//:opentracing",
"@com_lightstep_tracer_cpp//:lightstep_tracer",
"@com_google_googletest//:gtest",
"@com_lightstep_tracer_cpp//:lightstep_tracer",
"@io_opentracing_cpp//:opentracing",
],
)

Expand Down
1 change: 1 addition & 0 deletions bazel/target_recipes.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# ci/build_container/build_recipes.
TARGET_RECIPES = {
"ares": "cares",
"benchmark": "benchmark",
"event": "libevent",
"event_pthreads": "libevent",
"tcmalloc_and_profiler": "gperftools",
Expand Down
20 changes: 20 additions & 0 deletions ci/build_container/build_recipes/benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e
export COMMIT="e1c3a83b8197cf02e794f61228461c27d4e78cfb" # benchmark @ Jan 11, 2018

git clone https://github.com/google/benchmark.git
(cd benchmark; git reset --hard "$COMMIT")
mkdir build

cd build
cmake -G "Unix Makefiles" ../benchmark \
-DCMAKE_BUILD_TYPE=RELEASE \
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF
make
cp src/libbenchmark.a "$THIRDPARTY_BUILD"/lib
cd ../benchmark

INCLUDE_DIR="$THIRDPARTY_BUILD/include/testing/base/public"
mkdir -p "$INCLUDE_DIR"
cp include/benchmark/benchmark.h "$INCLUDE_DIR"
7 changes: 7 additions & 0 deletions ci/prebuilt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ cc_library(
includes = ["thirdparty_build/include"],
)

cc_library(
name = "benchmark",
srcs = ["thirdparty_build/lib/libbenchmark.a"],
hdrs = ["thirdparty_build/include/testing/base/public/benchmark.h"],
includes = ["thirdparty_build/include"],
)

cc_library(
name = "crypto",
srcs = ["thirdparty_build/lib/libcrypto.a"],
Expand Down