简体   繁体   English

如何使用c工具链为Android构建Tensorflow本机?

[英]How to build tensorflow native for android using clang toolchain?

Based on this bazel using clang , need to add command line option for setting android compiler option. 基于使用clang的bazel ,需要添加命令行选项来设置android编译器选项。 How does this translate to *.bzl files, crosstool files in tensorflow? 这如何转换为*.bzl文件, *.bzl crosstool文件?

Bazel 0.4.5 and later support Android NDK clang via the --android_compiler=clang3.8 build flag. Bazel 0.4.5和更高版本通过--android_compiler=clang3.8 build标志支持Android NDK clang。 Note that in NDK13, clang is the default (previous was gcc) so this flag is only needed for NDK12 and prior. 请注意,在NDK13中,clang是默认值(以前是gcc),因此仅NDK12和更低版本需要此标志。 No bzl or crosstool files necessary (although android_ndk_repository is actually generating a crosstool file under the hood). 不需要bzl或crosstool文件(尽管android_ndk_repository实际上是在后台生成了crosstool文件)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM