github.phpd.cn/thought-machine/please@v12.2.0+incompatible/test/cross_compile/lib/BUILD (about)

     1  # This contains an arbitrary set of rules intended to exercise
     2  # aspects of the cross-compilation code.
     3  
     4  go_binary(
     5      name = 'generator',
     6      srcs = ['main.go'],
     7  )
     8  
     9  genrule(
    10      name = 'generated',
    11      outs = ['gen.txt'],
    12      cmd = '$TOOL > $OUT',
    13      tools = [':generator'],
    14  )
    15  
    16  c_embed_binary(
    17      name = 'embed',
    18      src = ':generated',
    19  )
    20  
    21  c_library(
    22      name = 'lib',
    23      srcs = ['lib.c'],
    24      hdrs = ['lib.h'],
    25      deps = [':embed'],
    26      visibility = ['//test/cross_compile:all'],
    27  )