Search code examples
c++buck

Reading the result of a Buck genrule into Buck


I am trying to use to build . LevelDB has a script that generates some platform-specific flags. I can call the script from Buck using a genrule, but now I need to extract some of the flags from the output.

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

Is it possible to read the result of a target as a string into Buck?


Solution

  • Are you talking about using the genrule output as input to the Buck parser? This isn't possible.