bazel tensorflow目标名称误解

时间:2019-07-10 06:28:52

标签: tensorflow build bazel

我尝试了解tensorflow 2.0项目中的bazel依赖树。
在tensorflow / tensorflow / BUILD:598中,有一个目标:

tf_cc_shared_object(  
    name = "tensorflow_cc",

当我尝试用淡褐色查询它时

bazel query //tensorflow:libtensorflow_cc --output location

我收到此错误:

ERROR: no such target '//tensorflow:libtensorflow_cc': target 'libtensorflow_cc' not declared in package 'tensorflow' (did you mean 'libtensorflow.so'?) defined by projects/tensorflow/tensorflow/BUILD

为什么缺少目标是我在BUILD文件中找不到的其他目标?

1 个答案:

答案 0 :(得分:0)

那不是:

bazel query //tensorflow:tensorflow_cc --output location

为我产生以下输出:

[...]/tensorflow/tensorflow/BUILD:611:1: filegroup rule //tensorflow:tensorflow_cc
Loading: 0 packages loaded