You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/infra/control/main/targets.bzl

46 lines
1.0 KiB

6 years ago
load("//infra/bazel:build.bzl", "foreign_go_binary")
def gen_targets(matrix):
pkg = "v2ray.com/core/infra/control/main"
4 years ago
output = "v2ctl"
4 years ago
for (os, arch, ver) in matrix:
if arch in ["arm"]:
4 years ago
bin_name = "v2ctl_" + os + "_" + arch + "_" + ver
foreign_go_binary(
name = bin_name,
pkg = pkg,
4 years ago
output = output,
4 years ago
os = os,
arch = arch,
4 years ago
ver = ver,
arm = ver,
4 years ago
gotags = "confonly",
)
4 years ago
else:
bin_name = "v2ctl_" + os + "_" + arch
4 years ago
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = output,
os = os,
arch = arch,
4 years ago
ver = ver,
4 years ago
gotags = "confonly",
)
4 years ago
if arch in ["mips", "mipsle"]:
bin_name = "v2ctl_" + os + "_" + arch + "_softfloat"
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = output + "_softfloat",
os = os,
arch = arch,
ver = ver,
mips = "softfloat",
gotags = "confonly",
)