File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1717# for building custom op libraries for TensorFlow.
1818TF_CFLAGS=( $( python -c ' import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))' ) )
1919TF_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}
You can’t perform that action at this time.
0 commit comments