diff options
author | Andrew Kryczka <andrewkr@fb.com> | 2018-08-09 12:34:44 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-08-09 12:42:43 -0700 |
commit | 9e8ef45066498c2c6b81b10b2193d5d4b71ba378 (patch) | |
tree | 7e6763961a385f67af78ebe3ee3548d7e91f12d6 | |
parent | b15379dceab5a7ef387561af35b73c1b6def93b0 (diff) |
Link to FB internal build of ZSTD with -fPIC (#4249)
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: https://github.com/facebook/rocksdb/pull/4249
Differential Revision: D9244746
Pulled By: ajkr
fbshipit-source-id: 8c6a8fadd6c8643b2077afcbc3626779e1d73b63
-rw-r--r-- | build_tools/fbcode_config.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/build_tools/fbcode_config.sh b/build_tools/fbcode_config.sh index af6899296..26e465c38 100644 --- a/build_tools/fbcode_config.sh +++ b/build_tools/fbcode_config.sh @@ -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/" |