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/main/targets.bzl

68 lines
1.5 KiB

6 years ago
load("//infra/bazel:build.bzl", "foreign_go_binary")
6 years ago
def gen_targets(matrix):
pkg = "./main"
6 years ago
output = "v2ray"
4 years ago
for (os, arch, ver) in matrix:
6 years ago
if arch in ["arm"]:
4 years ago
bin_name = "v2ray_" + os + "_" + arch + "_" + ver
foreign_go_binary(
name = bin_name,
pkg = pkg,
4 years ago
output = output,
os = os,
arch = arch,
4 years ago
ver = ver,
arm = ver,
)
4 years ago
if os in ["windows"]:
bin_name = "v2ray_" + os + "_" + arch + "_" + ver + "_nowindow"
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = "w" + output,
os = os,
arch = arch,
ver = ver,
arm = ver,
ld = "-H windowsgui",
)
else:
bin_name = "v2ray_" + os + "_" + arch
4 years ago
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,
4 years ago
)
4 years ago
if os in ["windows"]:
bin_name = "v2ray_" + os + "_" + arch + "_nowindow"
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = "w" + output,
os = os,
arch = arch,
ver = ver,
ld = "-H windowsgui",
)
if arch in ["mips", "mipsle"]:
bin_name = "v2ray_" + os + "_" + arch + "_softfloat"
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = output + "_softfloat",
os = os,
arch = arch,
ver = ver,
mips = "softfloat",
)