Skip to content

Commit e91a23e

Browse files
author
Johannes Ballé
committed
Merge branch 'master' of github.com:tensorflow/compression
2 parents 5e4c762 + f08bfeb commit e91a23e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compression/compile.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,12 @@
1717
# for building custom op libraries for TensorFlow.
1818
TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') )
1919
TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') )
20+
2021
# If you get a link error during test, build with -D_GLIBCXX_USE_CXX11_ABI=0.
21-
g++ -std=c++11 -shared kernels/pmf_to_cdf_op.cc kernels/range_coder.cc kernels/range_coder_ops.cc kernels/range_coder_ops_util.cc ops/coder_ops.cc -o _coder_ops.so -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2 -undefined dynamic_lookup
22+
OPTIONAL_MAC_FLAG=''
23+
24+
if [ "$uname" == "Darwin" ]; then
25+
OPTIONAL_MAC_FLAG='-undefined dynamic_lookup'
26+
fi
27+
28+
g++ -std=c++11 -shared kernels/pmf_to_cdf_op.cc kernels/range_coder.cc kernels/range_coder_ops.cc kernels/range_coder_ops_util.cc ops/coder_ops.cc -o _coder_ops.so -fPIC ${TF_CFLAGS[@]} ${TF_LFLAGS[@]} -O2 ${OPTIONAL_MAC_FLAG}

0 commit comments

Comments
 (0)