Commit a4c84c1b authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Add wire_format_lite_inl.h include to implicit_weak_message.cc

implicit_weak_message.cc is part of protobuf_lite.dll, and it includes
wire_format_lite.h, which includes the dllexport inline function
WireFormatLite::WriteGroupToArray which will therefore be emitted.

WriteGroupToArray in turn calls the inline function
InternalWriteGroupToArray, however that definition is provided in the
_inl file. To make sure the definition is available, the _inl file must
be included.

Before Clang r344987 the build worked anyway (due to luck), because
InternalWriteGroupToArray was emitted into other object files (e.g. in
wire_format_lite.obj). After that Clang revision, those definitions
started getting inlined, and so are longer available and cause a link
failure for the reference from implicit_weak_message.obj.

Bug: 901776
Change-Id: I60ba265495eba6e868f0799f697c0d172e4c2fb1
Reviewed-on: https://chromium-review.googlesource.com/c/1317910
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605641}
parent 03829be3
......@@ -91,3 +91,7 @@ Description of the patches:
Corrects override in proto_writer.h.
https://github.com/google/protobuf/pull/4707
- 0024-add_wire_format_lite_inl_include.patch
Fix components build on Windows.
https://github.com/protocolbuffers/protobuf/pull/5316
diff --git a/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc b/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc
index 7a1d4446bf32..5189efba35e9 100644
--- a/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc
+++ b/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc
@@ -33,6 +33,7 @@
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/wire_format_lite.h>
+#include <google/protobuf/wire_format_lite_inl.h>
namespace google {
namespace protobuf {
......@@ -33,6 +33,7 @@
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/wire_format_lite_inl.h>
namespace google {
namespace protobuf {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment