diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-03-23 00:49:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-23 00:49:50 +0800 |
commit | 1c1dc0e0fc41d871aa17377d407515f437d3a54d (patch) | |
tree | 86ac3ad0a9cdf683f347741e4adcd4f74c7522b0 | |
parent | 6742fc526f3e1ae985d82a1781df4267485e2c70 (diff) | |
parent | c6e6f1fec26833bffc7dd0c9e346fa6579f66dff (diff) | |
download | dexon-1c1dc0e0fc41d871aa17377d407515f437d3a54d.tar.gz dexon-1c1dc0e0fc41d871aa17377d407515f437d3a54d.tar.zst dexon-1c1dc0e0fc41d871aa17377d407515f437d3a54d.zip |
Merge pull request #3808 from fjl/build-go-1.7
build: require Go >= 1.7
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | build/ci.go | 22 | ||||
-rwxr-xr-x | build/env.sh | 3 |
4 files changed, 6 insertions, 29 deletions
diff --git a/.travis.yml b/.travis.yml index 64343625d..5f3ff9d16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,6 @@ matrix: include: - os: linux dist: trusty - go: 1.5.4 - env: - - GO15VENDOREXPERIMENT=1 - - os: linux - dist: trusty - go: 1.6.2 - - os: linux - dist: trusty go: 1.7.5 # These are the latest Go versions, only run go vet and misspell on these @@ -16,7 +16,7 @@ For prerequisites and detailed build instructions please read the [Installation Instructions](https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum) on the wiki. -Building geth requires both a Go and a C compiler. +Building geth requires both a Go (version 1.7 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run diff --git a/build/ci.go b/build/ci.go index 914ce9eae..cb9c7a335 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) } @@ -215,20 +215,9 @@ func doInstall(cmdline []string) { } func buildFlags(env build.Environment) (flags []string) { - if os.Getenv("GO_OPENCL") != "" { - 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 +238,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" |