Search code examples
tensorflowbazel

Passing compilation flags to bazel (TensorFlow)


I am compiling TensorFlow from sources on an ARM7-equipped SoC, thus it is a non-standard compilation. Bazel fails in many cases but it is easy to fix if I could pass it some additional compilation flags: for example

-I/home/root/.cache/bazel/_bazel_turing/508b67e7022bdc82335b30f64f498c49/tenso
rflow/external/eigen_archive/eigen-eigen-ed4c9730b545/ -I/home/root/.cache/baz
el/_bazel_turing/508b67e7022bdc82335b30f64f498c49/tensorflow/external/eigen_arch
ive/

How can I pass those extra flags to Bazel?


Solution

  • --copt is the way to set C flags from the command line but those flag should be set already by bazel when building tensorflow.

    What is the output of bazel build -s? Can you see the includes of gcc? (Maybe we should continue the discussion on the github issue tracker).