From 1231a528b59cb402748d2991312b7952c2429da9 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 23 Jan 2025 13:26:56 +0800 Subject: [PATCH] envoy 1.33.0 Signed-off-by: Adrian Cole Co-authored-by: Takeshi Yoneda --- Formula/e/envoy.rb | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/Formula/e/envoy.rb b/Formula/e/envoy.rb index a9a3b6fe1356..6d3781c4b4bf 100644 --- a/Formula/e/envoy.rb +++ b/Formula/e/envoy.rb @@ -1,11 +1,20 @@ class Envoy < Formula desc "Cloud-native high-performance edge/middle/service proxy" homepage "https://www.envoyproxy.io/index.html" - url "https://github.com/envoyproxy/envoy/archive/refs/tags/v1.31.0.tar.gz" - sha256 "39ba37aed81a9d4988a5736cf558243179f2bf1490843da25687d1aafd9d01c6" license "Apache-2.0" head "https://github.com/envoyproxy/envoy.git", branch: "main" + stable do + url "https://github.com/envoyproxy/envoy/archive/refs/tags/v1.33.0.tar.gz" + sha256 "fd726135761ea163f0312d49960c602c9b4fcb78ca3c36600975fed16e0787c4" + + # Backport disabling libcurl docs to fix build. Remove in the next release. + patch do + url "https://github.com/envoyproxy/envoy/commit/ae6cb3254cbf98999993d0120d289a207a57f825.patch?full_index=1" + sha256 "a5c25bad6884f382909036ac9e8c812c5d3ba3104f2f1d24f5035acf705b0d74" + end + end + livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) @@ -39,6 +48,10 @@ class Envoy < Formula depends_on "coreutils" => :build end + on_linux do + depends_on "lld" => :build + end + # https://github.com/envoyproxy/envoy/tree/main/bazel#supported-compiler-versions # GCC/ld.gold had some issues while building envoy 1.29 so use clang/lld instead fails_with :gcc @@ -51,21 +64,32 @@ def install --verbose_failures --action_env=PATH=#{env_path} --host_action_env=PATH=#{env_path} + --define=wasm=disabled ] - # GCC/ld.gold had some issues while building envoy so use clang/lld instead - args << "--config=clang" if OS.linux? + if OS.linux? + # GCC/ld.gold had some issues while building envoy so use clang/lld instead + args << "--config=clang" + + # clang 18 introduced stricter thread safety analysis. Remove once release that supports clang 18 + # https://github.com/envoyproxy/envoy/issues/37911 + args << "--copt=-Wno-thread-safety-reference-return" - # clang 18 introduced stricter thread safety analysis - # https://github.com/envoyproxy/envoy/issues/34233 - args << "--copt=-Wno-thread-safety-reference-return" if DevelopmentTools.clang_version >= 18 + # Workaround to build with Clang 19 until envoy uses newer tcmalloc + # https://github.com/google/tcmalloc/commit/a37da0243b83bd2a7b1b53c187efd4fbf46e6e38 + args << "--copt=-Wno-unused-but-set-variable" + + # Workaround to build with Clang 19 until envoy uses newer grpc + # https://github.com/grpc/grpc/commit/e55f69cedd0ef7344e0bcb64b5ec9205e6aa4f04 + args << "--copt=-Wno-missing-template-arg-list-after-template-kw" + end # Write the current version SOURCE_VERSION. system "python3", "tools/github/write_current_source_version.py", "--skip_error_in_git" system Formula["bazelisk"].opt_bin/"bazelisk", "build", *args, "//source/exe:envoy-static.stripped" bin.install "bazel-bin/source/exe/envoy-static.stripped" => "envoy" - pkgshare.install "configs", "examples" + pkgshare.install "configs" end test do