Skip to content

Commit f2e97f2

Browse files
authored
feature: Upgrade the internal snappy version to 1.1.10 (1.1.8 was wrongly used before) (#508)
* Upgrade to snappy 1.1.10 binary * Use a specific snappy version * Use cmake 3.16.x for mac-x86_64 * Add -ftemplate-depth for Mac x86_64 build
1 parent 98b2225 commit f2e97f2

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.github/workflows/build-native.yml

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@v4
33+
- name: Setup cmake
34+
uses: jwlawson/[email protected]
35+
with:
36+
cmake-version: '3.16.x'
3337
- name: Build native libraries
3438
run: make clean-native native-all
3539
env:

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc snappy.cc
1414
SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(SNAPPY_VERSION)
1515
SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC))
1616
SNAPPY_GIT_REPO_URL:=https://github.com/google/snappy
17-
SNAPPY_GIT_REV:=537f4ad6240e586970fe554614542e9717df7902 # 1.1.8
17+
# Change this variable to use a specific git commit
18+
SNAPPY_GIT_REV:=$(SNAPPY_VERSION)
1819
SNAPPY_UNPACKED:=$(TARGET)/snappy-extracted.log
1920
SNAPPY_GIT_UNPACKED:=$(TARGET)/snappy-git-extracted.log
2021
SNAPPY_CMAKE_CACHE=$(SNAPPY_OUT)/CMakeCache.txt
@@ -79,6 +80,7 @@ $(SNAPPY_GIT_UNPACKED):
7980
@mkdir -p $(SNAPPY_SRC_DIR)
8081
git clone $(SNAPPY_GIT_REPO_URL) $(SNAPPY_SRC_DIR)
8182
git --git-dir=$(SNAPPY_SRC_DIR)/.git --work-tree=$(SNAPPY_SRC_DIR) checkout -b local/snappy-$(SNAPPY_VERSION) $(SNAPPY_GIT_REV)
83+
cd $(SNAPPY_SRC_DIR) && git submodule update --init
8284
touch $@
8385

8486
$(SNAPPY_CMAKE_CACHE): $(SNAPPY_GIT_UNPACKED)

Makefile.common

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Mac-x86_SNAPPY_FLAGS :=
258258

259259
Mac-x86_64_CXX := c++ -arch $(OS_ARCH)
260260
Mac-x86_64_STRIP := strip -x
261-
Mac-x86_64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.7 -fvisibility=hidden -stdlib=libc++ -std=c++11
261+
Mac-x86_64_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.7 -fvisibility=hidden -stdlib=libc++ -std=c++11 -ftemplate-depth=1024
262262
Mac-x86_64_LINKFLAGS := -dynamiclib
263263
Mac-x86_64_LIBNAME := libsnappyjava.dylib
264264
Mac-x86_64_SNAPPY_FLAGS :=
Binary file not shown.

0 commit comments

Comments
 (0)