Skip to content

Commit 6f6056a

Browse files
committed
fix(thirdparty/src/leveldb): do not link to snappy library
1 parent 8d8d2e6 commit 6f6056a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

thirdparty/src/leveldb/build_detect_platform

+6
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ EOF
190190
COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
191191
fi
192192

193+
<<COMMENT
194+
# Disable snappy if statically linked to librime.
195+
# Work around https://github.com/rime/squirrel/pull/188
196+
# Otherwise librime may accidentally link to the snappy library in system search path.
197+
193198
# Test whether Snappy library is installed
194199
# http://code.google.com/p/snappy/
195200
$CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null <<EOF
@@ -200,6 +205,7 @@ EOF
200205
COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY"
201206
PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy"
202207
fi
208+
COMMENT
203209

204210
# Test whether tcmalloc is available
205211
$CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF

0 commit comments

Comments
 (0)