all: remove support for Go 1.11 and 1.12
Go 1.13 has some important improvements that we would like to use, such as the new integer literals and `errors.Is` which both arrived in Go 1.13.
Этот коммит содержится в:
родитель
c54bdf8b51
коммит
b0366743cd
5 изменённых файлов: 4 добавлений и 43 удалений
|
@ -342,18 +342,6 @@ commands:
|
||||||
- /go/pkg/mod
|
- /go/pkg/mod
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-llvm10-go111:
|
|
||||||
docker:
|
|
||||||
- image: circleci/golang:1.11-buster
|
|
||||||
steps:
|
|
||||||
- test-linux:
|
|
||||||
llvm: "10"
|
|
||||||
test-llvm10-go112:
|
|
||||||
docker:
|
|
||||||
- image: circleci/golang:1.12-buster
|
|
||||||
steps:
|
|
||||||
- test-linux:
|
|
||||||
llvm: "10"
|
|
||||||
test-llvm10-go113:
|
test-llvm10-go113:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.13-buster
|
- image: circleci/golang:1.13-buster
|
||||||
|
@ -399,8 +387,6 @@ jobs:
|
||||||
workflows:
|
workflows:
|
||||||
test-all:
|
test-all:
|
||||||
jobs:
|
jobs:
|
||||||
- test-llvm10-go111
|
|
||||||
- test-llvm10-go112
|
|
||||||
- test-llvm10-go113
|
- test-llvm10-go113
|
||||||
- test-llvm10-go114
|
- test-llvm10-go114
|
||||||
- test-llvm11-go115
|
- test-llvm11-go115
|
||||||
|
|
|
@ -23,7 +23,7 @@ different guide:
|
||||||
LLVM, Clang and LLD are quite light on dependencies, requiring only standard
|
LLVM, Clang and LLD are quite light on dependencies, requiring only standard
|
||||||
build tools to be built. Go is of course necessary to build TinyGo itself.
|
build tools to be built. Go is of course necessary to build TinyGo itself.
|
||||||
|
|
||||||
* Go (1.11+)
|
* Go (1.13+)
|
||||||
* Standard build tools (gcc/clang)
|
* Standard build tools (gcc/clang)
|
||||||
* git
|
* git
|
||||||
* CMake
|
* CMake
|
||||||
|
@ -43,11 +43,6 @@ You can also store LLVM outside of the TinyGo root directory by setting the
|
||||||
`LLVM_BUILDDIR`, `CLANG_SRC` and `LLD_SRC` make variables, but that is not
|
`LLVM_BUILDDIR`, `CLANG_SRC` and `LLD_SRC` make variables, but that is not
|
||||||
covered by this guide.
|
covered by this guide.
|
||||||
|
|
||||||
TinyGo uses Go modules, so if you clone TinyGo inside your GOPATH (and are using
|
|
||||||
Go below 1.13), make sure that Go modules are enabled:
|
|
||||||
|
|
||||||
export GO111MODULE=on
|
|
||||||
|
|
||||||
## Build LLVM, Clang, LLD
|
## Build LLVM, Clang, LLD
|
||||||
|
|
||||||
Before starting the build, you may want to set the following environment
|
Before starting the build, you may want to set the following environment
|
||||||
|
|
|
@ -25,8 +25,8 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not read version from GOROOT (%v): %v", goroot, err)
|
return nil, fmt.Errorf("could not read version from GOROOT (%v): %v", goroot, err)
|
||||||
}
|
}
|
||||||
if major != 1 || minor < 11 || minor > 16 {
|
if major != 1 || minor < 13 || minor > 16 {
|
||||||
return nil, fmt.Errorf("requires go version 1.11 through 1.16, got go%d.%d", major, minor)
|
return nil, fmt.Errorf("requires go version 1.13 through 1.16, got go%d.%d", major, minor)
|
||||||
}
|
}
|
||||||
clangHeaderPath := getClangHeaderPath(goenv.Get("TINYGOROOT"))
|
clangHeaderPath := getClangHeaderPath(goenv.Get("TINYGOROOT"))
|
||||||
return &compileopts.Config{
|
return &compileopts.Config{
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module github.com/tinygo-org/tinygo
|
module github.com/tinygo-org/tinygo
|
||||||
|
|
||||||
go 1.11
|
go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2
|
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
// +build !go1.12
|
|
||||||
|
|
||||||
package runtime
|
|
||||||
|
|
||||||
import "internal/bytealg"
|
|
||||||
|
|
||||||
// The following functions provide compatibility with Go 1.11.
|
|
||||||
// See the following:
|
|
||||||
// https://github.com/tinygo-org/tinygo/issues/351
|
|
||||||
// https://github.com/golang/go/commit/ad4a58e31501bce5de2aad90a620eaecdc1eecb8
|
|
||||||
|
|
||||||
//go:linkname indexByte strings.IndexByte
|
|
||||||
func indexByte(s string, c byte) int {
|
|
||||||
return bytealg.IndexByteString(s, c)
|
|
||||||
}
|
|
||||||
|
|
||||||
//go:linkname bytesEqual bytes.Equal
|
|
||||||
func bytesEqual(a, b []byte) bool {
|
|
||||||
return bytealg.Equal(a, b)
|
|
||||||
}
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче