Skip to content

Commit

Permalink
fix(thirdparty/src/leveldb): do not link to snappy library
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Mar 18, 2018
1 parent 8d8d2e6 commit 6f6056a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions thirdparty/src/leveldb/build_detect_platform
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ EOF
COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
fi

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

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

0 comments on commit 6f6056a

Please sign in to comment.