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

build: use clang-10 #11222

Merged
merged 25 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
Next Next commit
update references to clang-10
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
  • Loading branch information
lizan committed May 15, 2020
commit cd49a48d115f27a887a646fb9ceb39ecbbecc5c9
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ build:remote-msan --config=rbe-toolchain-msan

# Docker sandbox
# NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/master/toolchains/rbe_toolchains_config.bzl#L8
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:04f06115b6ee7cfea74930353fb47a41149cbec3
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:12b3d2c2ffa582507e5d6dd34632b2b990f1b195
build:docker-sandbox --spawn_strategy=docker
build:docker-sandbox --strategy=Javac=docker
build:docker-sandbox --strategy=Closure=docker
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ executors:
description: "A regular build executor based on ubuntu image"
docker:
# NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/master/toolchains/rbe_toolchains_config.bzl#L8
- image: envoyproxy/envoy-build-ubuntu:04f06115b6ee7cfea74930353fb47a41149cbec3
- image: envoyproxy/envoy-build-ubuntu:12b3d2c2ffa582507e5d6dd34632b2b990f1b195
resource_class: xlarge
working_directory: /source

Expand Down
4 changes: 2 additions & 2 deletions bazel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ for more details.
## Supported compiler versions

We now require Clang >= 5.0 due to known issues with std::string thread safety and C++14 support. GCC >= 7 is also
known to work. Currently the CI is running with Clang 9.
known to work. Currently the CI is running with Clang 10.

## Clang STL debug symbols

Expand Down Expand Up @@ -671,7 +671,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-9.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang-format"
export CLANG_FORMAT="$HOME/ext/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format"
export BUILDIFIER_BIN="/usr/bin/buildifier"
```

Expand Down
2 changes: 1 addition & 1 deletion bazel/external/compiler_rt.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ licenses(["notice"]) # Apache 2

cc_library(
name = "fuzzed_data_provider",
hdrs = ["fuzzer/utils/FuzzedDataProvider.h"],
hdrs = ["fuzzer/FuzzedDataProvider.h"],
visibility = ["//visibility:public"],
)
14 changes: 7 additions & 7 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ DEPENDENCY_REPOSITORIES = dict(
use_category = ["build"],
),
envoy_build_tools = dict(
sha256 = "328648f158e7167f881d984433ff6bfe203bf0b815a99d98d22fb01a0fc95f70",
strip_prefix = "envoy-build-tools-f41e5ef5a023e50da088035449c6cdee0ae30d71",
# 2020-05-11
urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/f41e5ef5a023e50da088035449c6cdee0ae30d71.tar.gz"],
sha256 = "b0efe70a1d122fffb89570771f4ec3b912aa0a8a0ce56218223918d7737d01e2",
strip_prefix = "envoy-build-tools-3cbc1d66b9e9ead42daf69e01597cacf4fb52151",
# 2020-05-15
urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/3cbc1d66b9e9ead42daf69e01597cacf4fb52151.tar.gz"],
use_category = ["build"],
),
boringssl = dict(
Expand Down Expand Up @@ -434,10 +434,10 @@ DEPENDENCY_REPOSITORIES = dict(
# provided as part of the compiler-rt source distribution. We can't use the
# Clang variant as we are not a Clang-LLVM only shop today.
org_llvm_releases_compiler_rt = dict(
sha256 = "56e4cd96dd1d8c346b07b4d6b255f976570c6f2389697347a6c3dcb9e820d10e",
sha256 = "6a7da64d3a0a7320577b68b9ca4933bdcab676e898b759850e827333c3282c75",
# Only allow peeking at fuzzer related files for now.
strip_prefix = "compiler-rt-9.0.0.src/lib",
urls = ["http://releases.llvm.org/9.0.0/compiler-rt-9.0.0.src.tar.xz"],
strip_prefix = "compiler-rt-10.0.0.src/include",
urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/compiler-rt-10.0.0.src.tar.xz"],
use_category = ["test"],
),
upb = dict(
Expand Down
4 changes: 2 additions & 2 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ master commit at which the binary was compiled, and `latest` corresponds to a bi
Currently there are three build images:

* `envoyproxy/envoy-build` &mdash; alias to `envoyproxy/envoy-build-ubuntu`.
* `envoyproxy/envoy-build-ubuntu` &mdash; based on Ubuntu 18.04 (Bionic) with GCC 9 and Clang 9 compiler.
* `envoyproxy/envoy-build-centos` &mdash; based on CentOS 7 with GCC 9 and Clang 9 compiler, this image is experimental and not well tested.
* `envoyproxy/envoy-build-ubuntu` &mdash; based on Ubuntu 18.04 (Bionic) with GCC 9 and Clang 10 compiler.
* `envoyproxy/envoy-build-centos` &mdash; based on CentOS 7 with GCC 9 and Clang 10 compiler, this image is experimental and not well tested.

The source for these images is located in the [envoyproxy/envoy-build-tools](https://github.com/envoyproxy/envoy-build-tools)
repository.
Expand Down
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changes
* access loggers: file access logger config added :ref:`log_format <envoy_v3_api_field_extensions.access_loggers.file.v3.FileAccessLog.log_format>`.
* aggregate cluster: make route :ref:`retry_priority <envoy_v3_api_field_config.route.v3.RetryPolicy.retry_priority>` predicates work with :ref:`this cluster type <envoy_v3_api_msg_extensions.clusters.aggregate.v3.ClusterConfig>`.
* build: official released binary is now built on Ubuntu 18.04, requires glibc >= 2.27.
* build: official released binary is now built with Clang 10.0.0.
* compressor: generic :ref:`compressor <config_http_filters_compressor>` filter exposed to users.
* config: added :ref:`version_text <config_cluster_manager_cds>` stat that reflects xDS version.
* dynamic forward proxy: added :ref:`SNI based dynamic forward proxy <config_network_filters_sni_dynamic_forward_proxy>` support.
Expand Down
2 changes: 1 addition & 1 deletion test/fuzz/fuzz_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "libprotobuf_mutator/src/libfuzzer/libfuzzer_macro.h"
// Bring in FuzzedDataProvider, see
// https://github.com/google/fuzzing/blob/master/docs/split-inputs.md#fuzzed-data-provider
#include "fuzzer/utils/FuzzedDataProvider.h"
#include "fuzzer/FuzzedDataProvider.h"
#include "spdlog/spdlog.h"

namespace Envoy {
Expand Down
2 changes: 1 addition & 1 deletion tools/clang_tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ framework for writing Clang tools in the style of `clang-format` and
To build tools in this tree, a Clang binary install must be available. If you
are building Envoy with `clang`, this should already be true of your system. You
can find prebuilt binary releases of Clang at https://releases.llvm.org. You
will need the Clang version used by Envoy in CI (currently clang-9.0).
will need the Clang version used by Envoy in CI (currently clang-10.0).

To build a tool, set the following environment variable:

Expand Down
6 changes: 3 additions & 3 deletions tools/clang_tools/support/BUILD.prebuilt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Clang 9.0 library pre-built Bazel.
# Clang 10.0 library pre-built Bazel.
#
# This file was mostly manually assembled (with some hacky Python scripts) from
# clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz and corresponding
# https://github.com/llvm/llvm-project.git source. It needs Clang 9.0 to work.
# clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.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
# between the prebuilt libraries in a clang-llvm distribution to support building libtooling
Expand Down
10 changes: 5 additions & 5 deletions tools/code_format/check_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
# Only one C++ file should instantiate grpc_init
GRPC_INIT_WHITELIST = ("./source/common/grpc/google_grpc_context.cc")

CLANG_FORMAT_PATH = os.getenv("CLANG_FORMAT", "clang-format-9")
CLANG_FORMAT_PATH = os.getenv("CLANG_FORMAT", "clang-format-10")
BUILDIFIER_PATH = paths.getBuildifier()
BUILDOZER_PATH = paths.getBuildozer()
ENVOY_BUILD_FIXER_PATH = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),
Expand Down Expand Up @@ -245,13 +245,13 @@ def checkTools():
"users".format(CLANG_FORMAT_PATH))
else:
error_messages.append(
"Command {} not found. If you have clang-format in version 9.x.x "
"Command {} not found. If you have clang-format in version 10.x.x "
"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-9.0.0\n"
" export CLANG_FORMAT=/opt/bin/clang-format-9\n"
" export CLANG_FORMAT=/usr/local/opt/llvm@9/bin/clang-format".format(CLANG_FORMAT_PATH))
" 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(CLANG_FORMAT_PATH))

def checkBazelTool(name, path, var):
bazel_tool_abs_path = lookPath(path)
Expand Down