aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-03-22 22:52:44 +0800
committerFelix Lange <fjl@twurst.com>2017-03-22 23:00:16 +0800
commitda7af440609229b269bea41a8041cb25da4f12e8 (patch)
tree1aea5a79ea750b30fd4d8f2a5338db7ba413894a /build
parent6742fc526f3e1ae985d82a1781df4267485e2c70 (diff)
downloaddexon-da7af440609229b269bea41a8041cb25da4f12e8.tar
dexon-da7af440609229b269bea41a8041cb25da4f12e8.tar.gz
dexon-da7af440609229b269bea41a8041cb25da4f12e8.tar.bz2
dexon-da7af440609229b269bea41a8041cb25da4f12e8.tar.lz
dexon-da7af440609229b269bea41a8041cb25da4f12e8.tar.xz
dexon-da7af440609229b269bea41a8041cb25da4f12e8.tar.zst
dexon-da7af440609229b269bea41a8041cb25da4f12e8.zip
build: require Go >= 1.7
We have decided to bump the requirement to Go 1.7 because it enables subtests and allows dropping backwards-compatibility code. This is in line with Go's support policy. Go 1.6 and earlier no longer receive security updates.
Diffstat (limited to 'build')
-rw-r--r--build/ci.go18
-rwxr-xr-xbuild/env.sh3
2 files changed, 5 insertions, 16 deletions
diff --git a/build/ci.go b/build/ci.go
index 914ce9eae..6761a4c88 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -162,9 +162,9 @@ func doInstall(cmdline []string) {
// Check Go version. People regularly open issues about compilation
// failure with outdated Go. This should save them the trouble.
- if runtime.Version() < "go1.4" && !strings.HasPrefix(runtime.Version(), "devel") {
+ if runtime.Version() < "go1.7" && !strings.HasPrefix(runtime.Version(), "devel") {
log.Println("You have Go version", runtime.Version())
- log.Println("go-ethereum requires at least Go version 1.4 and cannot")
+ log.Println("go-ethereum requires at least Go version 1.7 and cannot")
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
os.Exit(1)
}
@@ -219,16 +219,9 @@ func buildFlags(env build.Environment) (flags []string) {
flags = append(flags, "-tags", "opencl")
}
- // Since Go 1.5, the separator char for link time assignments
- // is '=' and using ' ' prints a warning. However, Go < 1.5 does
- // not support using '='.
- sep := " "
- if runtime.Version() > "go1.5" || strings.Contains(runtime.Version(), "devel") {
- sep = "="
- }
// Set gitCommit constant via link-time assignment.
if env.Commit != "" {
- flags = append(flags, "-ldflags", "-X main.gitCommit"+sep+env.Commit)
+ flags = append(flags, "-ldflags", "-X main.gitCommit="+env.Commit)
}
return flags
}
@@ -249,10 +242,7 @@ func goToolArch(arch string, subcmd string, args ...string) *exec.Cmd {
cmd.Args = append(cmd.Args, []string{"-ldflags", "-extldflags -Wl,--allow-multiple-definition"}...)
}
}
- cmd.Env = []string{
- "GO15VENDOREXPERIMENT=1",
- "GOPATH=" + build.GOPATH(),
- }
+ cmd.Env = []string{"GOPATH=" + build.GOPATH()}
if arch == "" || arch == runtime.GOARCH {
cmd.Env = append(cmd.Env, "GOBIN="+GOBIN)
} else {
diff --git a/build/env.sh b/build/env.sh
index af560305b..3914555d1 100755
--- a/build/env.sh
+++ b/build/env.sh
@@ -20,8 +20,7 @@ fi
# Set up the environment to use the workspace.
GOPATH="$workspace"
-GO15VENDOREXPERIMENT=1
-export GOPATH GO15VENDOREXPERIMENT
+export GOPATH
# Run the command inside the workspace.
cd "$ethdir/go-ethereum"