1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/main/targets.bzl

148 lines
3.1 KiB
Python
Raw Normal View History

2019-02-10 13:19:05 -05:00
load("//infra/bazel:build.bzl", "foreign_go_binary")
load("//infra/bazel:gpg.bzl", "gpg_sign")
2018-10-03 17:27:42 -04:00
def gen_targets(matrix):
pkg = "v2ray.com/core/main"
output = "v2ray"
for (os, arch) in matrix:
bin_name = "v2ray_" + os + "_" + arch
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = output,
os = os,
arch = arch,
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
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,
ld = "-H windowsgui",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
bin_name = "v2ray_" + os + "_" + arch + "_armv7_nowindow"
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = "w" + output + "_armv7",
os = os,
arch = arch,
arm = "7",
ld = "-H windowsgui",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
bin_name = "v2ray_" + os + "_" + arch + "_armv6_nowindow"
foreign_go_binary(
name = bin_name,
pkg = pkg,
output = "w" + output + "_armv6",
os = os,
arch = arch,
arm = "6",
ld = "-H windowsgui",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
bin_name = "v2ray_" + os + "_" + arch + "_armv5_nowindow"
foreign_go_binary(
name = bin_name,
pkg = pkg,
2020-06-28 04:56:55 -04:00
output = "w" + output,
os = os,
arch = arch,
arm = "5",
ld = "-H windowsgui",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
2018-10-03 17:27:42 -04:00
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,
mips = "softfloat",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
if arch in ["arm"]:
bin_name = "v2ray_" + os + "_" + arch + "_armv7"
foreign_go_binary(
name = bin_name,
pkg = pkg,
2020-06-28 04:56:55 -04:00
output = output + "_armv7",
2018-10-03 17:27:42 -04:00
os = os,
arch = arch,
arm = "7",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
2019-10-31 07:24:37 -04:00
bin_name = "v2ray_" + os + "_" + arch + "_armv6"
foreign_go_binary(
name = bin_name,
pkg = pkg,
2020-06-28 04:56:55 -04:00
output = output + "_armv6",
2019-10-31 07:24:37 -04:00
os = os,
arch = arch,
arm = "6",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)
2020-06-19 08:20:14 -04:00
bin_name = "v2ray_" + os + "_" + arch + "_armv5"
foreign_go_binary(
name = bin_name,
pkg = pkg,
2020-06-28 04:56:55 -04:00
output = output,
2020-06-19 08:20:14 -04:00
os = os,
arch = arch,
arm = "5",
)
gpg_sign(
name = bin_name + "_sig",
base = ":" + bin_name,
)