aboutsummaryrefslogtreecommitdiff
path: root/projects/envoy
diff options
context:
space:
mode:
authorLizan Zhou <lizan@tetrate.io>2019-07-17 21:43:42 -0700
committerMax Moroz <mmoroz@chromium.org>2019-07-17 21:43:41 -0700
commit7f239c12a608501e35058de6dae2e705ded65dde (patch)
treeea96b5c6f767df918059fd0af5e75dd56c23447d /projects/envoy
parent09e316afef0c9201500463c4b5bf5ae16f390f78 (diff)
downloadoss-fuzz-7f239c12a608501e35058de6dae2e705ded65dde.tar.gz
[envoy] fix envoy fuzz build (#2615)
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Diffstat (limited to 'projects/envoy')
-rwxr-xr-xprojects/envoy/build.sh10
1 files changed, 3 insertions, 7 deletions
diff --git a/projects/envoy/build.sh b/projects/envoy/build.sh
index 4de90cae7..61ef0bfdf 100755
--- a/projects/envoy/build.sh
+++ b/projects/envoy/build.sh
@@ -32,16 +32,12 @@ FUZZER_DICTIONARIES="\
# file. Since the build runs with `-Werror` this will cause it to break, so we
# use `--conlyopt` and `--cxxopt` instead of `--copt`.
#
-# While we shouldn't need to set --host_linkopt, it turns out that some builds
-# with host toolchains, e.g. protobuf, pickup the fact that we're doing ASAN for
-# the target when building libraries but don't cleanly handle the host link for
-# build tools (protoc). It seems somewhat harmless to be building protoc ASAN.
declare -r EXTRA_BAZEL_FLAGS="$(
for f in ${CFLAGS}; do
- echo "--conlyopt=${f}" "--linkopt=${f}" "--host_linkopt=${f}"
+ echo "--conlyopt=${f}" "--linkopt=${f}"
done
for f in ${CXXFLAGS}; do
- echo "--cxxopt=${f}" "--linkopt=${f}" "--host_linkopt=${f}"
+ echo "--cxxopt=${f}" "--linkopt=${f}"
done
)"
@@ -67,7 +63,7 @@ bazel build --verbose_failures --dynamic_mode=off --spawn_strategy=standalone \
--define tcmalloc=disabled --define signal_trace=disabled \
--define ENVOY_CONFIG_ASAN=1 --copt -D__SANITIZE_ADDRESS__ \
--define force_libcpp=enabled --build_tag_filters=-no_asan \
- ${EXTRA_BAZEL_FLAGS} \
+ --linkopt=-lc++ --linkopt=-pthread ${EXTRA_BAZEL_FLAGS} \
${BAZEL_BUILD_TARGETS[*]} ${BAZEL_CORPUS_TARGETS[*]}
# Profiling with coverage requires that we resolve+copy all Bazel symlinks and