Integrating your build with TF can be painful. What we do in IREE is use some import binaries to get from TF models to an MLIR text representation. Then we pass of the MLIR text to our own ecosystem, which builds with both Bazel and CMake (getting TF to interop with CMake was a no-go). So you could do something similar and use tf-opt (or your own standalone tool integrated with the TF Bazel build system) to get to an MHLO representation and then hand it off from there. In IREE our input to the core compiler is now linalg, but we used to use MHLO. MHLO, specifically, does not need TF to build and has CMake support 1. There’s also a standalone repository 5 if you want to use that instead