- bazelisk
- clang 18
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
$ git checkout tags/v2.17.1
$ CC=clang bazelisk build -c opt //tensorflow/lite/c:libtensorflowlite_c.so
Compiled library is at bazel-bin/tensorflow/lite/c/
- libtensorflowlite_c.so
- bazelisk
- xcode
> git clone https://github.com/tensorflow/tensorflow.git
> cd tensorflow
> git checkout tags/v2.17.1
> CC=clang CXX=clang++ bazelisk build \
-c opt \
--copt=-O3 \
--copt=-flto \
--linkopt=-flto \
--define=tflite_enable_xnnpack=true \
--define=xnnpack_enable_subgraph_reshaping=true \
--define=no_tensorflow_py_deps=true \
--strip=always \
//tensorflow/lite/c:libtensorflowlite_c.dylib
Compiled libraries are at bazel-bin/tensorflow/lite/c
- libtensorflowlite_c.dylib
- bazelisk
- clang 18
- msys2
> git clone https://github.com/tensorflow/tensorflow.git
> cd tensorflow
> git checkout tags/v2.17.1
> $env:BAZEL_SH="C:/msys64/usr/bin/bash.exe"
> bazelisk.exe build --config=opt //tensorflow/lite/c:tensorflowlite_c
Compiled libraries are at bazel-bin\tensorflow\lite\c
- tensorflowlite_c.dll