Skip to content

Commit

Permalink
macos: fix linker error from CEL library (#32148)
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Greenway <ggreenway@apple.com>
  • Loading branch information
ggreenway authored Feb 7, 2024
1 parent 07a00cf commit d14ce54
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bazel/cel-cpp.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
diff --git a/eval/internal/interop.cc b/eval/internal/interop.cc
index 3acde6c..20f8ea3 100644
--- a/eval/internal/interop.cc
+++ b/eval/internal/interop.cc
@@ -729,13 +729,14 @@ absl::StatusOr<CelValue> ToLegacyValue(google::protobuf::Arena* arena,
return CelValue::CreateMessageWrapper(
MessageWrapperAccess::Make(message, type_info));
}
- if (ProtoStructValueToMessageWrapper) {
+ // This weak symbol is never defined in Envoy, and checking it causes linker failures on macOS
+ /*if (ProtoStructValueToMessageWrapper) {
auto maybe_message_wrapper = ProtoStructValueToMessageWrapper(*value);
if (maybe_message_wrapper.has_value()) {
return CelValue::CreateMessageWrapper(
std::move(maybe_message_wrapper).value());
}
- }
+ }*/
return absl::UnimplementedError(
"only legacy struct types and values can be used for interop");
}
diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc
index 6aeff6d..c43864c 100644
--- a/eval/public/cel_value.cc
Expand Down

0 comments on commit d14ce54

Please sign in to comment.