github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/infra/control/main/targets.bzl (about)

     1  load("//infra/bazel:build.bzl", "foreign_go_binary")
     2  
     3  def gen_targets(matrix):
     4    pkg = "./infra/control/main"
     5    output = "v2ctl"
     6  
     7    for (os, arch, ver) in matrix:
     8  
     9      if arch in ["arm"]:
    10        bin_name = "v2ctl_" + os + "_" + arch + "_" + ver
    11        foreign_go_binary(
    12          name = bin_name,
    13          pkg = pkg,
    14          output = output,
    15          os = os,
    16          arch = arch,
    17          ver = ver,
    18          arm = ver,
    19          gotags = "confonly",
    20        )
    21  
    22      else:
    23        bin_name = "v2ctl_" + os + "_" + arch
    24        foreign_go_binary(
    25          name = bin_name,
    26          pkg = pkg,
    27          output = output,
    28          os = os,
    29          arch = arch,
    30          ver = ver,
    31          gotags = "confonly",
    32        )
    33  
    34        if arch in ["mips", "mipsle"]:
    35          bin_name = "v2ctl_" + os + "_" + arch + "_softfloat"
    36          foreign_go_binary(
    37            name = bin_name,
    38            pkg = pkg,
    39            output = output + "_softfloat",
    40            os = os,
    41            arch = arch,
    42            ver = ver,
    43            mips = "softfloat",
    44            gotags = "confonly",
    45          )