From 7f239c12a608501e35058de6dae2e705ded65dde Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 17 Jul 2019 21:43:42 -0700 Subject: [PATCH] [envoy] fix envoy fuzz build (#2615) Signed-off-by: Lizan Zhou --- projects/envoy/build.sh | 10 +++------- 1 file 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