将 Buck genrule 的结果读入 Buck

Reading the result of a Buck genrule into Buck

我正在尝试使用 to build . LevelDB has a script that generates some platform-specific flags。我可以使用 genrule 从 Buck 调用脚本,但现在我需要从输出中提取一些标志。

genrule(
  name = 'build_config',
  out = 'build_config.mk',
  srcs = glob([
    'build_detect_platform',
    'db/**/*',
    'table/**/*',
    'util/**/*',
  ]),
  cmd = './build_detect_platform $OUT . ',
)

是否可以将目标的结果作为字符串读入 Buck?

您是在谈论使用 genrule 输出作为 Buck 解析器的输入吗?这是不可能的。