Skip to content

Commit 12c1727

Browse files
This change updates the third_party/protobuf/port_def.inc to disable the
protobuf weak messages feature when compiling for the WASM/emscripten environments. PiperOrigin-RevId: 789013144
1 parent 7544ebf commit 12c1727

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/google/protobuf/port_def.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
586586
#error PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED was previously defined
587587
#endif
588588
#if defined(__GNUC__) && defined(__clang__) && !defined(__APPLE__) && \
589-
!defined(_MSC_VER) && !defined(_WIN32)
589+
!defined(_MSC_VER) && !defined(_WIN32) && !defined(__wasm__) && \
590+
!defined(__EMSCRIPTEN__)
590591
#define PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED
591592
#endif
592593

0 commit comments

Comments
 (0)