Skip to content

Commit

Permalink
Link to FB internal build of ZSTD with -fPIC (facebook#4249)
Browse files Browse the repository at this point in the history
Summary:
TSAN requires the code is built with -fPIC. This PR links against a libzstd built with -fPIC when necessary, which enables ZSTD compression to be used in TSAN builds.
Pull Request resolved: facebook#4249

Differential Revision: D9244746

Pulled By: ajkr

fbshipit-source-id: 8c6a8fadd6c8643b2077afcbc3626779e1d73b63
ajkr authored and facebook-github-bot committed Aug 9, 2018
1 parent b15379d commit 9e8ef45
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build_tools/fbcode_config.sh
Original file line number Diff line number Diff line change
@@ -43,11 +43,15 @@ if test -z $PIC_BUILD; then
LZ4_INCLUDE=" -I $LZ4_BASE/include/"
LZ4_LIBS=" $LZ4_BASE/lib/liblz4.a"
CFLAGS+=" -DLZ4"
fi

ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
ZSTD_INCLUDE=" -I $ZSTD_BASE/include/"
if test -z $PIC_BUILD; then
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd.a"
CFLAGS+=" -DZSTD"
else
ZSTD_LIBS=" $ZSTD_BASE/lib/libzstd_pic.a"
fi
CFLAGS+=" -DZSTD"

# location of gflags headers and libraries
GFLAGS_INCLUDE=" -I $GFLAGS_BASE/include/"

0 comments on commit 9e8ef45

Please sign in to comment.