From ddbb513e8f8433f7fac4a897f6f8a6602f32c324 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 15:54:01 -0800 Subject: [PATCH 01/13] build: update to clang-11 Signed-off-by: Lizan Zhou --- .bazelrc | 2 +- .devcontainer/Dockerfile | 2 +- examples/wasm-cc/docker-compose-wasm.yaml | 5 ++--- tools/clang_tools/api_booster/main.cc | 10 +++++----- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.bazelrc b/.bazelrc index 209f1180ff024..fb4e2d4eee809 100644 --- a/.bazelrc +++ b/.bazelrc @@ -246,7 +246,7 @@ build:remote-clang-cl --config=rbe-toolchain-clang-cl # Docker sandbox # NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/main/toolchains/rbe_toolchains_config.bzl#L8 -build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:c8fa4235714003ba0896287ee2f91cae06e0e407 +build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:edbec0b7a298045bc4f3adbb2c04a3a2d257ccf5 build:docker-sandbox --spawn_strategy=docker build:docker-sandbox --strategy=Javac=docker build:docker-sandbox --strategy=Closure=docker diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index bd72c0ebde6be..8c89986fd289e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/envoy-ci/envoy-build:c8fa4235714003ba0896287ee2f91cae06e0e407 +FROM gcr.io/envoy-ci/envoy-build:edbec0b7a298045bc4f3adbb2c04a3a2d257ccf5 ARG USERNAME=vscode ARG USER_UID=501 diff --git a/examples/wasm-cc/docker-compose-wasm.yaml b/examples/wasm-cc/docker-compose-wasm.yaml index 5e30327cb98ed..12f63ed14e581 100644 --- a/examples/wasm-cc/docker-compose-wasm.yaml +++ b/examples/wasm-cc/docker-compose-wasm.yaml @@ -1,9 +1,8 @@ version: "3.7" services: - wasm_compile_update: - image: envoyproxy/envoy-build-ubuntu:c8fa4235714003ba0896287ee2f91cae06e0e407 + image: envoyproxy/envoy-build-ubuntu:edbec0b7a298045bc4f3adbb2c04a3a2d257ccf5 command: | bash -c "bazel build //examples/wasm-cc:envoy_filter_http_wasm_updated_example.wasm \ && cp -a bazel-bin/examples/wasm-cc/* /build" @@ -13,7 +12,7 @@ services: - ./lib:/build wasm_compile: - image: envoyproxy/envoy-build-ubuntu:c8fa4235714003ba0896287ee2f91cae06e0e407 + image: envoyproxy/envoy-build-ubuntu:edbec0b7a298045bc4f3adbb2c04a3a2d257ccf5 command: | bash -c "bazel build //examples/wasm-cc:envoy_filter_http_wasm_example.wasm \ && cp -a bazel-bin/examples/wasm-cc/* /build" diff --git a/tools/clang_tools/api_booster/main.cc b/tools/clang_tools/api_booster/main.cc index 976ddc969fcd8..1972a58d560c6 100644 --- a/tools/clang_tools/api_booster/main.cc +++ b/tools/clang_tools/api_booster/main.cc @@ -419,7 +419,7 @@ class ApiBooster : public clang::ast_matchers::MatchFinder::MatchCallback, } void insertReplacement(const clang::tooling::Replacement& replacement) { - llvm::Error error = replacements_[replacement.getFilePath()].add(replacement); + llvm::Error error = replacements_[std::string(replacement.getFilePath())].add(replacement); if (error) { std::cerr << " Replacement insertion error: " << llvm::toString(std::move(error)) << std::endl; @@ -447,15 +447,15 @@ class ApiBooster : public clang::ast_matchers::MatchFinder::MatchCallback, std::string getSourceText(clang::SourceLocation begin_loc, int size, const clang::SourceManager& source_manager) { - return clang::Lexer::getSourceText( + return std::string(clang::Lexer::getSourceText( {clang::SourceRange(begin_loc, begin_loc.getLocWithOffset(size)), false}, source_manager, - lexer_lopt_, 0); + lexer_lopt_, 0)); } std::string getSourceText(clang::SourceRange source_range, const clang::SourceManager& source_manager) { - return clang::Lexer::getSourceText(clang::CharSourceRange::getTokenRange(source_range), - source_manager, lexer_lopt_, 0); + return std::string(clang::Lexer::getSourceText( + clang::CharSourceRange::getTokenRange(source_range), source_manager, lexer_lopt_, 0)); } void addNamedspaceQualifiedTypeReplacement() {} From 892bb0a8454462e9c7548da93bfdd0d450f8f109 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 15:57:35 -0800 Subject: [PATCH 02/13] fix format Signed-off-by: Lizan Zhou --- source/common/common/interval_value.h | 9 ++++----- source/common/local_reply/local_reply.cc | 11 +++++------ test/common/network/apple_dns_impl_test.cc | 16 ++++++++-------- test/test_common/environment.cc | 6 +++--- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/source/common/common/interval_value.h b/source/common/common/interval_value.h index 3a058eaae4b54..e001a8a13a324 100644 --- a/source/common/common/interval_value.h +++ b/source/common/common/interval_value.h @@ -25,11 +25,10 @@ template class ClosedIntervalValue { // Returns a value that is as far from max as the original value is from min. // This guarantees that max().invert() == min() and min().invert() == max(). ClosedIntervalValue invert() const { - return ClosedIntervalValue(value_ == Interval::max_value - ? Interval::min_value - : value_ == Interval::min_value - ? Interval::max_value - : Interval::max_value - (value_ - Interval::min_value)); + return ClosedIntervalValue(value_ == Interval::max_value ? Interval::min_value + : value_ == Interval::min_value + ? Interval::max_value + : Interval::max_value - (value_ - Interval::min_value)); } // Comparisons are performed using the same operators on the underlying value diff --git a/source/common/local_reply/local_reply.cc b/source/common/local_reply/local_reply.cc index 42f8d32b0d383..753003f223b33 100644 --- a/source/common/local_reply/local_reply.cc +++ b/source/common/local_reply/local_reply.cc @@ -25,12 +25,11 @@ class BodyFormatter { BodyFormatter(const envoy::config::core::v3::SubstitutionFormatString& config, Api::Api& api) : formatter_(Formatter::SubstitutionFormatStringUtils::fromProtoConfig(config, api)), content_type_( - !config.content_type().empty() - ? config.content_type() - : config.format_case() == - envoy::config::core::v3::SubstitutionFormatString::FormatCase::kJsonFormat - ? Http::Headers::get().ContentTypeValues.Json - : Http::Headers::get().ContentTypeValues.Text) {} + !config.content_type().empty() ? config.content_type() + : config.format_case() == + envoy::config::core::v3::SubstitutionFormatString::FormatCase::kJsonFormat + ? Http::Headers::get().ContentTypeValues.Json + : Http::Headers::get().ContentTypeValues.Text) {} void format(const Http::RequestHeaderMap& request_headers, const Http::ResponseHeaderMap& response_headers, diff --git a/test/common/network/apple_dns_impl_test.cc b/test/common/network/apple_dns_impl_test.cc index 9d9fbb534d127..7cc40baf6f193 100644 --- a/test/common/network/apple_dns_impl_test.cc +++ b/test/common/network/apple_dns_impl_test.cc @@ -350,12 +350,12 @@ TEST_F(AppleDnsImplFakeApiTest, SynchronousErrorInGetAddrInfo) { // The Query's sd ref will be deallocated. EXPECT_CALL(dns_service_, dnsServiceRefDeallocate(_)); - EXPECT_EQ(nullptr, resolver_->resolve( - "foo.com", Network::DnsLookupFamily::Auto, - [](DnsResolver::ResolutionStatus, std::list &&) -> void { - // This callback should never be executed. - FAIL(); - })); + EXPECT_EQ(nullptr, + resolver_->resolve("foo.com", Network::DnsLookupFamily::Auto, + [](DnsResolver::ResolutionStatus, std::list&&) -> void { + // This callback should never be executed. + FAIL(); + })); } TEST_F(AppleDnsImplFakeApiTest, QuerySynchronousCompletion) { @@ -428,7 +428,7 @@ TEST_F(AppleDnsImplFakeApiTest, IncorrectInterfaceIndexReturned) { resolver_->resolve( hostname, Network::DnsLookupFamily::Auto, - [](DnsResolver::ResolutionStatus, std::list &&) -> void { FAIL(); }); + [](DnsResolver::ResolutionStatus, std::list&&) -> void { FAIL(); }); } TEST_F(AppleDnsImplFakeApiTest, QueryCompletedWithError) { @@ -785,7 +785,7 @@ TEST_F(AppleDnsImplFakeApiTest, ResultWithNullAddress) { auto query = resolver_->resolve( hostname, Network::DnsLookupFamily::Auto, - [](DnsResolver::ResolutionStatus, std::list &&) -> void { FAIL(); }); + [](DnsResolver::ResolutionStatus, std::list&&) -> void { FAIL(); }); ASSERT_NE(nullptr, query); EXPECT_DEATH(reply_callback(nullptr, kDNSServiceFlagsAdd, 0, kDNSServiceErr_NoError, diff --git a/test/test_common/environment.cc b/test/test_common/environment.cc index 029cdb9193e6a..cfeb632b9d8bc 100644 --- a/test/test_common/environment.cc +++ b/test/test_common/environment.cc @@ -383,9 +383,9 @@ std::string TestEnvironment::temporaryFileSubstitute(const std::string& path, out_json_string = substitute(out_json_string, version); auto name = Filesystem::fileSystemForTest().splitPathFromFilename(path).file_; - const std::string extension = absl::EndsWith(name, ".yaml") - ? ".yaml" - : absl::EndsWith(name, ".pb_text") ? ".pb_text" : ".json"; + const std::string extension = absl::EndsWith(name, ".yaml") ? ".yaml" + : absl::EndsWith(name, ".pb_text") ? ".pb_text" + : ".json"; const std::string out_json_path = TestEnvironment::temporaryPath(name) + ".with.ports" + extension; { From 2e87588c182e0e01993e4fc5b6632ca465ec028a Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 18:05:33 -0800 Subject: [PATCH 03/13] fix Signed-off-by: Lizan Zhou --- .bazelrc | 2 +- .github/workflows/codeql-daily.yml | 12 ++++++------ .github/workflows/codeql-push.yml | 11 ++++++----- bazel/README.md | 6 +++--- test/run_envoy_bazel_coverage.sh | 2 +- tools/clang_tools/support/BUILD.prebuilt | 4 ++-- tools/code_format/check_format.py | 6 +++--- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.bazelrc b/.bazelrc index fb4e2d4eee809..319cf0897ccd6 100644 --- a/.bazelrc +++ b/.bazelrc @@ -174,7 +174,7 @@ build:rbe-toolchain-asan --linkopt -fuse-ld=lld build:rbe-toolchain-asan --action_env=ENVOY_UBSAN_VPTR=1 build:rbe-toolchain-asan --copt=-fsanitize=vptr,function build:rbe-toolchain-asan --linkopt=-fsanitize=vptr,function -build:rbe-toolchain-asan --linkopt=-L/opt/llvm/lib/clang/10.0.0/lib/linux +build:rbe-toolchain-asan --linkopt=-L/opt/llvm/lib/clang/11.0.1/lib/linux build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a build:rbe-toolchain-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a diff --git a/.github/workflows/codeql-daily.yml b/.github/workflows/codeql-daily.yml index d947fa50a5a65..52a6a30ea1ea6 100644 --- a/.github/workflows/codeql-daily.yml +++ b/.github/workflows/codeql-daily.yml @@ -35,15 +35,15 @@ jobs: shell: bash run: | sudo apt-get update && sudo apt-get install libtool cmake automake autoconf make ninja-build curl unzip virtualenv openjdk-11-jdk build-essential libc++1 - mkdir -p bin/clang10 - cd bin/clang10 - wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz - tar -xf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components 1 - export PATH=bin/clang10/bin:$PATH + mkdir -p bin/clang11 + cd bin/clang11 + wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz + tar -xf clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz --strip-components 1 + export PATH=bin/clang11/bin:$PATH - name: Build run: | - bazel/setup_clang.sh bin/clang10 + bazel/setup_clang.sh bin/clang11 bazelisk shutdown bazelisk build -c fastbuild --spawn_strategy=local --discard_analysis_cache --nouse_action_cache --config clang --config libc++ //source/common/http/... diff --git a/.github/workflows/codeql-push.yml b/.github/workflows/codeql-push.yml index fbe091a90ec00..6eaa36042eee4 100644 --- a/.github/workflows/codeql-push.yml +++ b/.github/workflows/codeql-push.yml @@ -43,11 +43,12 @@ jobs: shell: bash run: | sudo apt-get update && sudo apt-get install libtool cmake automake autoconf make ninja-build curl unzip virtualenv openjdk-11-jdk build-essential libc++1 - mkdir -p bin/clang10 - cd bin/clang10 - wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz - tar -xf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components 1 - export PATH=bin/clang10/bin:$PATH + mkdir -p bin/clang11 + cd bin/clang11 + wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.1/clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz + tar -xf clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz --strip-components 1 + export PATH=bin/clang11/bin:$PATH + - name: Build run: | diff --git a/bazel/README.md b/bazel/README.md index 8f9203d693d64..aa92b660d8946 100644 --- a/bazel/README.md +++ b/bazel/README.md @@ -561,7 +561,7 @@ bazel test -c dbg --config=docker-tsan //test/... Alternatively, you can build a local copy of TSAN-instrumented libc++. Follow the [quick start](#quick-start-bazel-build-for-developers) instruction to setup Clang+LLVM environment. Download LLVM sources from the [LLVM official site](https://github.com/llvm/llvm-project) ``` -curl -sSfL "https://github.com/llvm/llvm-project/archive/llvmorg-10.0.0.tar.gz" | tar zx +curl -sSfL "https://github.com/llvm/llvm-project/archive/llvmorg-11.0.1.tar.gz" | tar zx ``` @@ -572,7 +572,7 @@ mkdir tsan pushd tsan cmake -GNinja -DLLVM_ENABLE_PROJECTS="libcxxabi;libcxx" -DLLVM_USE_LINKER=lld -DLLVM_USE_SANITIZER=Thread -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX="/opt/libcxx_tsan" "../llvm-project-llvmorg-10.0.0/llvm" + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX="/opt/libcxx_tsan" "../llvm-project-llvmorg-11.0.1/llvm" ninja install-cxx install-cxxabi rm -rf /opt/libcxx_tsan/include @@ -860,7 +860,7 @@ also have 'buildifier' installed from the bazel distribution. Edit the paths shown here to reflect the installation locations on your system: ```shell -export CLANG_FORMAT="$HOME/ext/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format" +export CLANG_FORMAT="$HOME/ext/clang+llvm-11.0.1-x86_64-linux-gnu-ubuntu-20.04/bin/clang-format" export BUILDIFIER_BIN="/usr/bin/buildifier" ``` diff --git a/test/run_envoy_bazel_coverage.sh b/test/run_envoy_bazel_coverage.sh index 6221cbd0d1b06..cb0076a1261ae 100755 --- a/test/run_envoy_bazel_coverage.sh +++ b/test/run_envoy_bazel_coverage.sh @@ -2,7 +2,7 @@ set -e -LLVM_VERSION="10.0.0" +LLVM_VERSION="11.0.1" CLANG_VERSION=$(clang --version | grep version | sed -e 's/\ *clang version \(.*\)\ /\1/') LLVM_COV_VERSION=$(llvm-cov --version | grep version | sed -e 's/\ *LLVM version \(.*\)/\1/') LLVM_PROFDATA_VERSION=$(llvm-profdata show --version | grep version | sed -e 's/\ *LLVM version \(.*\)/\1/') diff --git a/tools/clang_tools/support/BUILD.prebuilt b/tools/clang_tools/support/BUILD.prebuilt index e77dcb0fe2685..5a86563741982 100644 --- a/tools/clang_tools/support/BUILD.prebuilt +++ b/tools/clang_tools/support/BUILD.prebuilt @@ -1,7 +1,7 @@ -# Clang 10.0 library pre-built Bazel. +# Clang 11.0 library pre-built Bazel. # # This file was mostly manually assembled (with some hacky Python scripts) from -# clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz and corresponding +# clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz and corresponding # https://github.com/llvm/llvm-project.git source. It needs Clang 10.0 to work. # # The BUILD file has sufficient dependency relationships diff --git a/tools/code_format/check_format.py b/tools/code_format/check_format.py index af6b1bd43b4b6..33630ffd46fb4 100755 --- a/tools/code_format/check_format.py +++ b/tools/code_format/check_format.py @@ -333,9 +333,9 @@ def checkTools(self): "installed, but the binary name is different or it's not available in " "PATH, please use CLANG_FORMAT environment variable to specify the path. " "Examples:\n" - " export CLANG_FORMAT=clang-format-10.0.0\n" - " export CLANG_FORMAT=/opt/bin/clang-format-10\n" - " export CLANG_FORMAT=/usr/local/opt/llvm@10/bin/clang-format".format( + " export CLANG_FORMAT=clang-format-11.0.1\n" + " export CLANG_FORMAT=/opt/bin/clang-format-11\n" + " export CLANG_FORMAT=/usr/local/opt/llvm@11/bin/clang-format".format( CLANG_FORMAT_PATH)) def checkBazelTool(name, path, var): From 46e725dc1c7262ffee1eff8675b0623c591e957e Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 18:09:08 -0800 Subject: [PATCH 04/13] fix Signed-off-by: Lizan Zhou --- bazel/repository_locations.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index adc2d7ae514a4..7cb788105e1c1 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -640,11 +640,11 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "LLVM", project_desc = "LLVM Compiler Infrastructure", project_url = "https://llvm.org", - version = "10.0.0", - sha256 = "df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf", + version = "11.0.1", + sha256 = "087be3f1116e861cd969c9b0b0903c27028b52eaf45157276f50a9c2500687fc", strip_prefix = "llvm-{version}.src", urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-{version}.src.tar.xz"], - release_date = "2020-03-23", + release_date = "2021-01-05", use_category = ["dataplane_ext"], extensions = ["envoy.wasm.runtime.wavm"], cpe = "cpe:2.3:a:llvm:*:*", From 600528519763994070d6a8d19326b7ad6845b102 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 18:35:57 -0800 Subject: [PATCH 05/13] fix Signed-off-by: Lizan Zhou --- bazel/repository_locations.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 7cb788105e1c1..6c8bda76d70f0 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -641,7 +641,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_desc = "LLVM Compiler Infrastructure", project_url = "https://llvm.org", version = "11.0.1", - sha256 = "087be3f1116e861cd969c9b0b0903c27028b52eaf45157276f50a9c2500687fc", + sha256 = "ccd87c254b6aebc5077e4e6977d08d4be888e7eb672c6630a26a15d58b59b528", strip_prefix = "llvm-{version}.src", urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-{version}.src.tar.xz"], release_date = "2021-01-05", @@ -825,12 +825,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "compiler-rt", project_desc = "LLVM compiler runtime library", project_url = "https://compiler-rt.llvm.org", - version = "10.0.0", - sha256 = "6a7da64d3a0a7320577b68b9ca4933bdcab676e898b759850e827333c3282c75", + version = "11.0.1", + sha256 = "087be3f1116e861cd969c9b0b0903c27028b52eaf45157276f50a9c2500687fc", # Only allow peeking at fuzzer related files for now. strip_prefix = "compiler-rt-{version}.src", urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/compiler-rt-{version}.src.tar.xz"], - release_date = "2020-03-23", + release_date = "2021-01-05", use_category = ["test_only"], ), upb = dict( From cade02a76d17fcd0588224b9e16ae714ebc4386d Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 19:16:41 -0800 Subject: [PATCH 06/13] fix Signed-off-by: Lizan Zhou --- bazel/repository_locations.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 6c8bda76d70f0..9b1706bfeac8c 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -644,7 +644,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( sha256 = "ccd87c254b6aebc5077e4e6977d08d4be888e7eb672c6630a26a15d58b59b528", strip_prefix = "llvm-{version}.src", urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-{version}.src.tar.xz"], - release_date = "2021-01-05", + release_date = "2020-12-18", use_category = ["dataplane_ext"], extensions = ["envoy.wasm.runtime.wavm"], cpe = "cpe:2.3:a:llvm:*:*", @@ -830,7 +830,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( # Only allow peeking at fuzzer related files for now. strip_prefix = "compiler-rt-{version}.src", urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/compiler-rt-{version}.src.tar.xz"], - release_date = "2021-01-05", + release_date = "2020-12-18", use_category = ["test_only"], ), upb = dict( From 751616959d9bb159d1a458dc095a11a921343a72 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 22:00:14 -0800 Subject: [PATCH 07/13] fix Signed-off-by: Lizan Zhou --- test/run_envoy_bazel_coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run_envoy_bazel_coverage.sh b/test/run_envoy_bazel_coverage.sh index cb0076a1261ae..f2f44ea651fa8 100755 --- a/test/run_envoy_bazel_coverage.sh +++ b/test/run_envoy_bazel_coverage.sh @@ -3,7 +3,7 @@ set -e LLVM_VERSION="11.0.1" -CLANG_VERSION=$(clang --version | grep version | sed -e 's/\ *clang version \(.*\)\ /\1/') +CLANG_VERSION=$(clang --version | grep version | sed -e 's/\ *clang version \(.*\)\ */\1/') LLVM_COV_VERSION=$(llvm-cov --version | grep version | sed -e 's/\ *LLVM version \(.*\)/\1/') LLVM_PROFDATA_VERSION=$(llvm-profdata show --version | grep version | sed -e 's/\ *LLVM version \(.*\)/\1/') From 6d7e201bab4e35341eef1565229b55e6adb0d632 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 22:03:19 -0800 Subject: [PATCH 08/13] fix Signed-off-by: Lizan Zhou --- bazel/foreign_cc/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/bazel/foreign_cc/BUILD b/bazel/foreign_cc/BUILD index aa73e3bbbcac7..30afd9c79a907 100644 --- a/bazel/foreign_cc/BUILD +++ b/bazel/foreign_cc/BUILD @@ -79,6 +79,7 @@ configure_make( envoy_cmake_external( name = "ares", cache_entries = { + "CARES_BUILD_TOOLS": "no", "CARES_SHARED": "no", "CARES_STATIC": "on", "CMAKE_CXX_COMPILER_FORCED": "on", From 56a60a6889b35d56d0c2955d257df0e6a2b87c46 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 22:04:51 -0800 Subject: [PATCH 09/13] fix Signed-off-by: Lizan Zhou --- tools/api_boost/api_boost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/api_boost/api_boost.py b/tools/api_boost/api_boost.py index 5cd9846bcf218..7d15fdf19156b 100755 --- a/tools/api_boost/api_boost.py +++ b/tools/api_boost/api_boost.py @@ -143,7 +143,7 @@ def ApiBoostTree(target_paths, # a cleaner approach. llvm_include_path = os.path.join( sp.check_output([os.getenv('LLVM_CONFIG'), '--libdir']).decode().rstrip(), - 'clang/9.0.0/include') + 'clang/11.0.1/include') # Determine the files in the target dirs eligible for API boosting, based on # known files in the compilation database. From 0004f539dc5364371f3d7dc24270de4e534693d5 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 23:35:35 -0800 Subject: [PATCH 10/13] fix Signed-off-by: Lizan Zhou --- bazel/repository_locations.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 9b1706bfeac8c..12a672fc2787a 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -65,11 +65,11 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "envoy-build-tools", project_desc = "Common build tools shared by the Envoy/UDPA ecosystem", project_url = "https://github.com/envoyproxy/envoy-build-tools", - version = "f2a7f9ba09660beacfebcd37fc977480ec9a8f50", - sha256 = "ca9975f6d5370843167b9646028ca7a0b546f8821f217c9d9d2e033a94a35f31", + version = "d36336060aa1ade024654dec009adc4a19e3efd6", + sha256 = "7b379e69eafb883cebb52a5ed11b1a12710dd77a33de79c0bc207f6458a5f712", strip_prefix = "envoy-build-tools-{version}", urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/{version}.tar.gz"], - release_date = "2021-01-04", + release_date = "2021-01-28", use_category = ["build"], ), boringssl = dict( From 081e79a6df8d56b93fcfd6aceb239de08daddda6 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 10 Feb 2021 23:51:09 -0800 Subject: [PATCH 11/13] fix Signed-off-by: Lizan Zhou --- .github/workflows/codeql-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-push.yml b/.github/workflows/codeql-push.yml index 6eaa36042eee4..e204ce770c7e8 100644 --- a/.github/workflows/codeql-push.yml +++ b/.github/workflows/codeql-push.yml @@ -52,7 +52,7 @@ jobs: - name: Build run: | - bazel/setup_clang.sh bin/clang10 + bazel/setup_clang.sh bin/clang11 bazelisk shutdown bazelisk build -c fastbuild --spawn_strategy=local --discard_analysis_cache --nouse_action_cache --config clang --config libc++ $BUILD_TARGETS echo -e "Built targets...\n$BUILD_TARGETS" From fc11dd22ddcbfa2aa6cc11f32ffa425f6564d148 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 11 Feb 2021 12:09:16 -0800 Subject: [PATCH 12/13] revert llvm-src Signed-off-by: Lizan Zhou --- bazel/repository_locations.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 12a672fc2787a..74ec99e765a79 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -640,11 +640,11 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "LLVM", project_desc = "LLVM Compiler Infrastructure", project_url = "https://llvm.org", - version = "11.0.1", - sha256 = "ccd87c254b6aebc5077e4e6977d08d4be888e7eb672c6630a26a15d58b59b528", + version = "10.0.0", + sha256 = "df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf", strip_prefix = "llvm-{version}.src", urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-{version}.src.tar.xz"], - release_date = "2020-12-18", + release_date = "2020-03-23", use_category = ["dataplane_ext"], extensions = ["envoy.wasm.runtime.wavm"], cpe = "cpe:2.3:a:llvm:*:*", From 55b050255f0d81e2772d52ff8edbbce57e0dbba2 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 18 Feb 2021 21:50:18 -0800 Subject: [PATCH 13/13] fix coverage number Signed-off-by: Lizan Zhou --- test/per_file_coverage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index 712fcf91017fa..53730d0aadb39 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -3,8 +3,8 @@ # directory:coverage_percent # for existing directories with low coverage. declare -a KNOWN_LOW_COVERAGE=( -"source/common/api:75.4" -"source/common/api/posix:74.0" +"source/common/api:75.3" +"source/common/api/posix:73.9" "source/common/common:96.3" "source/common/common/posix:94.1" "source/common/crypto:0.0"