我有一个看起来像这样的工作区:
- data_folder
- folder_1
- 已构建
- target_2.cc
- 已构建
- target_1.cc
- WORKSPACE
BUILD包含目标:
cc_binary(
name = "target_1",
srcs = ["target_1.cc"],
data = ["//data"] // it works fine here
)
folder_1 / BUILD包含目标:
cc_binary(
name = "target_2",
srcs = ["target_2.cc"],
data = ["//data"] // it DOESN'T work. Here is the problem
)
我希望target_2使用该data_folder,但是找不到使用bazel提供它的任何正确方法。如何在数据字段中引用上级Golder?