mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
forcely disable cgo
This commit is contained in:
parent
f69f551c99
commit
b2d6df011f
@ -15,7 +15,7 @@ func buildV2Ray(targetFile string, version string, goOS GoOS, goArch GoArch) err
|
||||
ldFlags = ldFlags + " -X v2ray.com/core.version=" + version + " -X v2ray.com/core.build=" + today
|
||||
}
|
||||
cmd := exec.Command("go", "build", "-tags", "json", "-o", targetFile, "-compiler", "gc", "-ldflags", ldFlags, "v2ray.com/core/main")
|
||||
cmd.Env = append(cmd.Env, "GOOS="+string(goOS), "GOARCH="+string(goArch))
|
||||
cmd.Env = append(cmd.Env, "GOOS="+string(goOS), "GOARCH="+string(goArch), "CGO_ENABLED=0")
|
||||
cmd.Env = append(cmd.Env, os.Environ()...)
|
||||
output, err := cmd.CombinedOutput()
|
||||
if len(output) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user