Skip to content

Commit 8416f97

Browse files
ivandeexnegative0
authored andcommitted
build: Temporary fix for Windows build errors
Applies a temporary fix similar to grafana/grafana#28557 before go 1.15.6+ fixes golang/go#40795
1 parent 28af7b6 commit 8416f97

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
go: '1.15.x'
4747
gotags: cmount
4848
build_flags: '-include "^windows/amd64" -cgo'
49+
build_args: '-buildmode exe'
4950
quicktest: true
5051
racequicktest: true
5152
deploy: true
@@ -57,6 +58,7 @@ jobs:
5758
goarch: '386'
5859
cgo: '1'
5960
build_flags: '-include "^windows/386" -cgo'
61+
build_args: '-buildmode exe'
6062
quicktest: true
6163
deploy: true
6264

@@ -109,6 +111,7 @@ jobs:
109111
run: |
110112
echo 'GOTAGS=${{ matrix.gotags }}' >> $GITHUB_ENV
111113
echo 'BUILD_FLAGS=${{ matrix.build_flags }}' >> $GITHUB_ENV
114+
echo 'BUILD_ARGS=${{ matrix.build_args }}' >> $GITHUB_ENV
112115
if [[ "${{ matrix.goarch }}" != "" ]]; then echo 'GOARCH=${{ matrix.goarch }}' >> $GITHUB_ENV ; fi
113116
if [[ "${{ matrix.cgo }}" != "" ]]; then echo 'CGO_ENABLED=${{ matrix.cgo }}' >> $GITHUB_ENV ; fi
114117

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ endif
4646
.PHONY: rclone test_all vars version
4747

4848
rclone:
49-
go build -v --ldflags "-s -X github.com/rclone/rclone/fs.Version=$(TAG)" $(BUILDTAGS)
49+
go build -v --ldflags "-s -X github.com/rclone/rclone/fs.Version=$(TAG)" $(BUILDTAGS) $(BUILD_ARGS)
5050
mkdir -p `go env GOPATH`/bin/
5151
cp -av rclone`go env GOEXE` `go env GOPATH`/bin/rclone`go env GOEXE`.new
5252
mv -v `go env GOPATH`/bin/rclone`go env GOEXE`.new `go env GOPATH`/bin/rclone`go env GOEXE`

0 commit comments

Comments
 (0)