Skip to content

Commit 48dc34b

Browse files
authored
build: remove xgo cross-builds (ethereum#23800)
xgo is not maintained at this time, so none of these builds work. Closes ethereum#23784
1 parent 0e7efd6 commit 48dc34b

File tree

3 files changed

+1
-172
lines changed

3 files changed

+1
-172
lines changed

.travis.yml

-30
Original file line numberDiff line numberDiff line change
@@ -120,36 +120,6 @@ jobs:
120120
- go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
121121
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
122122

123-
# This builder does the Linux Azure MIPS xgo uploads
124-
- stage: build
125-
if: type = push
126-
os: linux
127-
dist: bionic
128-
services:
129-
- docker
130-
go: 1.17.x
131-
env:
132-
- azure-linux-mips
133-
- GO111MODULE=on
134-
git:
135-
submodules: false # avoid cloning ethereum/tests
136-
script:
137-
- go run build/ci.go xgo --alltools -- --targets=linux/mips --ldflags '-extldflags "-static"' -v
138-
- for bin in build/bin/*-linux-mips; do mv -f "${bin}" "${bin/-linux-mips/}"; done
139-
- go run build/ci.go archive -arch mips -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
140-
141-
- go run build/ci.go xgo --alltools -- --targets=linux/mipsle --ldflags '-extldflags "-static"' -v
142-
- for bin in build/bin/*-linux-mipsle; do mv -f "${bin}" "${bin/-linux-mipsle/}"; done
143-
- go run build/ci.go archive -arch mipsle -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
144-
145-
- go run build/ci.go xgo --alltools -- --targets=linux/mips64 --ldflags '-extldflags "-static"' -v
146-
- for bin in build/bin/*-linux-mips64; do mv -f "${bin}" "${bin/-linux-mips64/}"; done
147-
- go run build/ci.go archive -arch mips64 -type tar -signer LINUX_SIGNING_KEY signify SIGNIFY_KEY -upload gethstore/builds
148-
149-
- go run build/ci.go xgo --alltools -- --targets=linux/mips64le --ldflags '-extldflags "-static"' -v
150-
- for bin in build/bin/*-linux-mips64le; do mv -f "${bin}" "${bin/-linux-mips64le/}"; done
151-
- go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
152-
153123
# This builder does the Android Maven and Azure uploads
154124
- stage: build
155125
if: type = push

Makefile

+1-97
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
# with Go source code. If you know what GOPATH is then you probably
33
# don't need to bother with make.
44

5-
.PHONY: geth android ios geth-cross evm all test clean
6-
.PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le
7-
.PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
8-
.PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64
9-
.PHONY: geth-windows geth-windows-386 geth-windows-amd64
5+
.PHONY: geth android ios evm all test clean
106

117
GOBIN = ./build/bin
128
GO ?= latest
@@ -53,95 +49,3 @@ devtools:
5349
env GOBIN= go install ./cmd/abigen
5450
@type "solc" 2> /dev/null || echo 'Please install solc'
5551
@type "protoc" 2> /dev/null || echo 'Please install protoc'
56-
57-
# Cross Compilation Targets (xgo)
58-
59-
geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios
60-
@echo "Full cross compilation done:"
61-
@ls -ld $(GOBIN)/geth-*
62-
63-
geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le
64-
@echo "Linux cross compilation done:"
65-
@ls -ld $(GOBIN)/geth-linux-*
66-
67-
geth-linux-386:
68-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth
69-
@echo "Linux 386 cross compilation done:"
70-
@ls -ld $(GOBIN)/geth-linux-* | grep 386
71-
72-
geth-linux-amd64:
73-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth
74-
@echo "Linux amd64 cross compilation done:"
75-
@ls -ld $(GOBIN)/geth-linux-* | grep amd64
76-
77-
geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
78-
@echo "Linux ARM cross compilation done:"
79-
@ls -ld $(GOBIN)/geth-linux-* | grep arm
80-
81-
geth-linux-arm-5:
82-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth
83-
@echo "Linux ARMv5 cross compilation done:"
84-
@ls -ld $(GOBIN)/geth-linux-* | grep arm-5
85-
86-
geth-linux-arm-6:
87-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth
88-
@echo "Linux ARMv6 cross compilation done:"
89-
@ls -ld $(GOBIN)/geth-linux-* | grep arm-6
90-
91-
geth-linux-arm-7:
92-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth
93-
@echo "Linux ARMv7 cross compilation done:"
94-
@ls -ld $(GOBIN)/geth-linux-* | grep arm-7
95-
96-
geth-linux-arm64:
97-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth
98-
@echo "Linux ARM64 cross compilation done:"
99-
@ls -ld $(GOBIN)/geth-linux-* | grep arm64
100-
101-
geth-linux-mips:
102-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth
103-
@echo "Linux MIPS cross compilation done:"
104-
@ls -ld $(GOBIN)/geth-linux-* | grep mips
105-
106-
geth-linux-mipsle:
107-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth
108-
@echo "Linux MIPSle cross compilation done:"
109-
@ls -ld $(GOBIN)/geth-linux-* | grep mipsle
110-
111-
geth-linux-mips64:
112-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth
113-
@echo "Linux MIPS64 cross compilation done:"
114-
@ls -ld $(GOBIN)/geth-linux-* | grep mips64
115-
116-
geth-linux-mips64le:
117-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth
118-
@echo "Linux MIPS64le cross compilation done:"
119-
@ls -ld $(GOBIN)/geth-linux-* | grep mips64le
120-
121-
geth-darwin: geth-darwin-386 geth-darwin-amd64
122-
@echo "Darwin cross compilation done:"
123-
@ls -ld $(GOBIN)/geth-darwin-*
124-
125-
geth-darwin-386:
126-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth
127-
@echo "Darwin 386 cross compilation done:"
128-
@ls -ld $(GOBIN)/geth-darwin-* | grep 386
129-
130-
geth-darwin-amd64:
131-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth
132-
@echo "Darwin amd64 cross compilation done:"
133-
@ls -ld $(GOBIN)/geth-darwin-* | grep amd64
134-
135-
geth-windows: geth-windows-386 geth-windows-amd64
136-
@echo "Windows cross compilation done:"
137-
@ls -ld $(GOBIN)/geth-windows-*
138-
139-
geth-windows-386:
140-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth
141-
@echo "Windows 386 cross compilation done:"
142-
@ls -ld $(GOBIN)/geth-windows-* | grep 386
143-
144-
geth-windows-amd64:
145-
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth
146-
@echo "Windows amd64 cross compilation done:"
147-
@ls -ld $(GOBIN)/geth-windows-* | grep amd64

build/ci.go

-45
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Available commands are:
3333
nsis -- creates a Windows NSIS installer
3434
aar [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an Android archive
3535
xcode [ -local ] [ -sign key-id ] [-deploy repo] [ -upload dest ] -- creates an iOS XCode framework
36-
xgo [ -alltools ] [ options ] -- cross builds according to options
3736
purge [ -store blobstore ] [ -days threshold ] -- purges old archives from the blobstore
3837
3938
For all commands, -n prevents execution of external programs (dry run mode).
@@ -188,8 +187,6 @@ func main() {
188187
doAndroidArchive(os.Args[2:])
189188
case "xcode":
190189
doXCodeFramework(os.Args[2:])
191-
case "xgo":
192-
doXgo(os.Args[2:])
193190
case "purge":
194191
doPurge(os.Args[2:])
195192
default:
@@ -1209,48 +1206,6 @@ func newPodMetadata(env build.Environment, archive string) podMetadata {
12091206
}
12101207
}
12111208

1212-
// Cross compilation
1213-
1214-
func doXgo(cmdline []string) {
1215-
var (
1216-
alltools = flag.Bool("alltools", false, `Flag whether we're building all known tools, or only on in particular`)
1217-
)
1218-
flag.CommandLine.Parse(cmdline)
1219-
env := build.Env()
1220-
var tc build.GoToolchain
1221-
1222-
// Make sure xgo is available for cross compilation
1223-
build.MustRun(tc.Install(GOBIN, "github.com/karalabe/xgo@latest"))
1224-
1225-
// If all tools building is requested, build everything the builder wants
1226-
args := append(buildFlags(env), flag.Args()...)
1227-
1228-
if *alltools {
1229-
args = append(args, []string{"--dest", GOBIN}...)
1230-
for _, res := range allToolsArchiveFiles {
1231-
if strings.HasPrefix(res, GOBIN) {
1232-
// Binary tool found, cross build it explicitly
1233-
args = append(args, "./"+filepath.Join("cmd", filepath.Base(res)))
1234-
build.MustRun(xgoTool(args))
1235-
args = args[:len(args)-1]
1236-
}
1237-
}
1238-
return
1239-
}
1240-
1241-
// Otherwise execute the explicit cross compilation
1242-
path := args[len(args)-1]
1243-
args = append(args[:len(args)-1], []string{"--dest", GOBIN, path}...)
1244-
build.MustRun(xgoTool(args))
1245-
}
1246-
1247-
func xgoTool(args []string) *exec.Cmd {
1248-
cmd := exec.Command(filepath.Join(GOBIN, "xgo"), args...)
1249-
cmd.Env = os.Environ()
1250-
cmd.Env = append(cmd.Env, []string{"GOBIN=" + GOBIN}...)
1251-
return cmd
1252-
}
1253-
12541209
// Binary distribution cleanups
12551210

12561211
func doPurge(cmdline []string) {

0 commit comments

Comments
 (0)