From f026826ed0ca24787a74e354f6f8c0beb119c4c2 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 5 Nov 2021 20:45:31 -0700 Subject: [PATCH] bazel: fix macOS build It seems that some combination of macOS Monterey and Xcode 13 started causing a build issue. The problem is that `mach/boolean.h` adds macros for `TRUE` and `FALSE` which conflicts with some of Envoy's own uses of these. We never import this directly so it's possible these macros are not new, but just exposed through headers in a new way. The core fix here is to patch cel-cpp working around https://github.com/google/cel-cpp/issues/121 The secondary fix is to remove this macro as envoy already did for windows. This stops any code that imports the platform header from hitting this in the future. This fixes: https://github.com/envoyproxy/envoy/issues/18842 Signed-off-by: Keith Smiley --- bazel/repository_locations.bzl | 6 +++--- envoy/common/platform.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 1de14053a2e88..3d69b36bf2f61 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -863,8 +863,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Common Expression Language (CEL) C++ library", project_desc = "Common Expression Language (CEL) C++ library", project_url = "https://opensource.google/projects/cel", - version = "89d81b2d2c24943b6e4fd5e8fc321099c2ab6d3f", - sha256 = "1408ef31e77ed847b420ff108da9652ad1702401008f2a75b671fba860a9707d", + version = "60c7aeabb4e6fa633b49c14d6c6fc8f0516761b9", + sha256 = "7cb1e8ce293182e1d28321d4d6baecdacbc263cffcd9da1f7ffd25312611a329", strip_prefix = "cel-cpp-{version}", urls = ["https://github.com/google/cel-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], @@ -879,7 +879,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.stat_sinks.wasm", "envoy.rbac.matchers.upstream_ip_port", ], - release_date = "2021-10-07", + release_date = "2021-11-08", cpe = "N/A", ), com_github_google_flatbuffers = dict( diff --git a/envoy/common/platform.h b/envoy/common/platform.h index cefe0da63a31e..8ae695d46c274 100644 --- a/envoy/common/platform.h +++ b/envoy/common/platform.h @@ -205,6 +205,8 @@ constexpr bool win32SupportsOriginalDestination() { #define be16toh(x) OSSwapBigToHostInt16((x)) #define be32toh(x) OSSwapBigToHostInt32((x)) #define be64toh(x) OSSwapBigToHostInt64((x)) + +#undef TRUE #else #include #endif