We are trying to build a TensorFlow test case with debug flag:
bazel build -c dbg //tensorflow/python/kernel_tests:sparse_matmul_op_test
However the build is failing with below error:
/usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
warning _FORTIFY_SOURCE requires compiling with optimization (-O)cc1: all warnings being treated as errors
Target //tensorflow/python/kernel_tests:sparse_matmul_op_test failed to build
We have tried below options to resolve this:
built by exporting export CFLAGS and CXXFLAGS to "-Wno-error"
bazel build -c dbg --cxxopt="-Wno-all" --cxxopt="-Wno-error" //tensorflow/python/kernel_tests:sparse_matmul_op_test
Tried commenting compiler_flag from third_party/gpus/crosstool/CROSSTOOL.tpl
What is the correct way to suppress these warnings for the build to proceed?
We are using gcc v5.4.0.