Skip to content

Commit

Permalink
feature: Upgrade the internal snappy version to 1.1.10 (1.1.8 was wro…
Browse files Browse the repository at this point in the history
…ngly 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
  • Loading branch information
xerial authored Sep 22, 2023
1 parent 98b2225 commit f2e97f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.16.x'
- name: Build native libraries
run: make clean-native native-all
env:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc snappy.cc
SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(SNAPPY_VERSION)
SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC))
SNAPPY_GIT_REPO_URL:=https://github.com/google/snappy
SNAPPY_GIT_REV:=537f4ad6240e586970fe554614542e9717df7902 # 1.1.8
# Change this variable to use a specific git commit
SNAPPY_GIT_REV:=$(SNAPPY_VERSION)
SNAPPY_UNPACKED:=$(TARGET)/snappy-extracted.log
SNAPPY_GIT_UNPACKED:=$(TARGET)/snappy-git-extracted.log
SNAPPY_CMAKE_CACHE=$(SNAPPY_OUT)/CMakeCache.txt
Expand Down Expand Up @@ -79,6 +80,7 @@ $(SNAPPY_GIT_UNPACKED):
@mkdir -p $(SNAPPY_SRC_DIR)
git clone $(SNAPPY_GIT_REPO_URL) $(SNAPPY_SRC_DIR)
git --git-dir=$(SNAPPY_SRC_DIR)/.git --work-tree=$(SNAPPY_SRC_DIR) checkout -b local/snappy-$(SNAPPY_VERSION) $(SNAPPY_GIT_REV)
cd $(SNAPPY_SRC_DIR) && git submodule update --init
touch $@

$(SNAPPY_CMAKE_CACHE): $(SNAPPY_GIT_UNPACKED)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Mac-x86_SNAPPY_FLAGS :=

Mac-x86_64_CXX := c++ -arch $(OS_ARCH)
Mac-x86_64_STRIP := strip -x
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
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
Mac-x86_64_LINKFLAGS := -dynamiclib
Mac-x86_64_LIBNAME := libsnappyjava.dylib
Mac-x86_64_SNAPPY_FLAGS :=
Expand Down
Binary file not shown.

0 comments on commit f2e97f2

Please sign in to comment.