Skip to content

firestore_snappy.patch.txt: fix linux gcc inlining build error #895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion cmake/external/firestore_snappy.patch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ new file mode 100644
index 000000000..9f25c03d0
--- /dev/null
+++ b/cmake/external/snappy.cmake
@@ -0,0 +1,39 @@
@@ -0,0 +1,40 @@
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -595,6 +595,25 @@ index 000000000..9f25c03d0
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ TEST_COMMAND ""
+ PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/snappy.patch
+
+ HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}"
+)
diff --git a/cmake/external/snappy.patch b/cmake/external/snappy.patch
new file mode 100644
index 000000000..28bfb0837
--- /dev/null
+++ b/cmake/external/snappy.patch
@@ -0,0 +1,12 @@
+diff -Naur snappy/snappy.cc snappy_patched/snappy.cc
+--- snappy/snappy.cc 2022-04-12 20:44:55.000000000 -0400
++++ snappy_patched/snappy.cc 2022-04-12 20:47:05.000000000 -0400
+@@ -1014,7 +1014,7 @@
+ }
+
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
+-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+ const uint8_t*& ip = *ip_p;
+ // This section is crucial for the throughput of the decompression loop.
+ // The latency of an iteration is fundamentally constrained by the