mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
dcf368bd93
* Bazel: remove GPG sign * Azure Pipelines: remove unnecessary steps
68 lines
1.6 KiB
Python
68 lines
1.6 KiB
Python
load("//infra/bazel:build.bzl", "foreign_go_binary")
|
|
|
|
def gen_targets(matrix):
|
|
pkg = "v2ray.com/core/main"
|
|
output = "v2ray"
|
|
|
|
for (os, arch, ver) in matrix:
|
|
|
|
if arch in ["arm"]:
|
|
bin_name = "v2ray_" + os + "_" + arch + "_" + ver
|
|
foreign_go_binary(
|
|
name = bin_name,
|
|
pkg = pkg,
|
|
output = output,
|
|
os = os,
|
|
arch = arch,
|
|
ver = ver,
|
|
arm = ver,
|
|
)
|
|
|
|
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
|
|
foreign_go_binary(
|
|
name = bin_name,
|
|
pkg = pkg,
|
|
output = output,
|
|
os = os,
|
|
arch = arch,
|
|
ver = ver,
|
|
)
|
|
|
|
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",
|
|
)
|