remove go fork for building windows/arm64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>v0.9
parent
b6b07d167b
commit
9e274c79c9
|
@ -29,7 +29,7 @@ FROM golatest AS go-darwin
|
||||||
FROM golatest AS go-windows-amd64
|
FROM golatest AS go-windows-amd64
|
||||||
FROM golatest AS go-windows-386
|
FROM golatest AS go-windows-386
|
||||||
FROM golatest AS go-windows-arm
|
FROM golatest AS go-windows-arm
|
||||||
FROM --platform=$BUILDPLATFORM tonistiigi/golang:497feff1-alpine AS go-windows-arm64
|
FROM --platform=$BUILDPLATFORM golang:1.17beta1-alpine AS go-windows-arm64
|
||||||
FROM go-windows-${TARGETARCH} AS go-windows
|
FROM go-windows-${TARGETARCH} AS go-windows
|
||||||
|
|
||||||
# gobuild is base stage for compiling go/cgo
|
# gobuild is base stage for compiling go/cgo
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -24,6 +24,8 @@ require (
|
||||||
github.com/gogo/googleapis v1.4.0
|
github.com/gogo/googleapis v1.4.0
|
||||||
github.com/gogo/protobuf v1.3.2
|
github.com/gogo/protobuf v1.3.2
|
||||||
github.com/golang/protobuf v1.5.2
|
github.com/golang/protobuf v1.5.2
|
||||||
|
// snappy: updated for go1.17 support
|
||||||
|
github.com/golang/snappy v0.0.4-0.20210608040537-544b4180ac70 // indirect
|
||||||
github.com/google/go-cmp v0.5.5
|
github.com/google/go-cmp v0.5.5
|
||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||||
github.com/gorilla/mux v1.8.0 // indirect
|
github.com/gorilla/mux v1.8.0 // indirect
|
||||||
|
|
3
go.sum
3
go.sum
|
@ -349,8 +349,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
|
|
||||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
|
github.com/golang/snappy v0.0.4-0.20210608040537-544b4180ac70 h1:yxuuMouxXYv9V1HprM9jTODJPGrTrC0FYVtPSnyIXxs=
|
||||||
|
github.com/golang/snappy v0.0.4-0.20210608040537-544b4180ac70/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
Amazon.com, Inc
|
Amazon.com, Inc
|
||||||
Damian Gryski <dgryski@gmail.com>
|
Damian Gryski <dgryski@gmail.com>
|
||||||
|
Eric Buth <eric@topos.com>
|
||||||
Google Inc.
|
Google Inc.
|
||||||
Jan Mercl <0xjnml@gmail.com>
|
Jan Mercl <0xjnml@gmail.com>
|
||||||
Klaus Post <klauspost@gmail.com>
|
Klaus Post <klauspost@gmail.com>
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
|
|
||||||
# Please keep the list sorted.
|
# Please keep the list sorted.
|
||||||
|
|
||||||
|
Alex Legg <alexlegg@google.com>
|
||||||
Damian Gryski <dgryski@gmail.com>
|
Damian Gryski <dgryski@gmail.com>
|
||||||
|
Eric Buth <eric@topos.com>
|
||||||
Jan Mercl <0xjnml@gmail.com>
|
Jan Mercl <0xjnml@gmail.com>
|
||||||
Jonathan Swinney <jswinney@amazon.com>
|
Jonathan Swinney <jswinney@amazon.com>
|
||||||
Kai Backman <kaib@golang.org>
|
Kai Backman <kaib@golang.org>
|
||||||
|
|
|
@ -118,32 +118,23 @@ func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read satisfies the io.Reader interface.
|
func (r *Reader) fill() error {
|
||||||
func (r *Reader) Read(p []byte) (int, error) {
|
for r.i >= r.j {
|
||||||
if r.err != nil {
|
|
||||||
return 0, r.err
|
|
||||||
}
|
|
||||||
for {
|
|
||||||
if r.i < r.j {
|
|
||||||
n := copy(p, r.decoded[r.i:r.j])
|
|
||||||
r.i += n
|
|
||||||
return n, nil
|
|
||||||
}
|
|
||||||
if !r.readFull(r.buf[:4], true) {
|
if !r.readFull(r.buf[:4], true) {
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
chunkType := r.buf[0]
|
chunkType := r.buf[0]
|
||||||
if !r.readHeader {
|
if !r.readHeader {
|
||||||
if chunkType != chunkTypeStreamIdentifier {
|
if chunkType != chunkTypeStreamIdentifier {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
r.readHeader = true
|
r.readHeader = true
|
||||||
}
|
}
|
||||||
chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16
|
chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16
|
||||||
if chunkLen > len(r.buf) {
|
if chunkLen > len(r.buf) {
|
||||||
r.err = ErrUnsupported
|
r.err = ErrUnsupported
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
|
|
||||||
// The chunk types are specified at
|
// The chunk types are specified at
|
||||||
|
@ -153,11 +144,11 @@ func (r *Reader) Read(p []byte) (int, error) {
|
||||||
// Section 4.2. Compressed data (chunk type 0x00).
|
// Section 4.2. Compressed data (chunk type 0x00).
|
||||||
if chunkLen < checksumSize {
|
if chunkLen < checksumSize {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
buf := r.buf[:chunkLen]
|
buf := r.buf[:chunkLen]
|
||||||
if !r.readFull(buf, false) {
|
if !r.readFull(buf, false) {
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
|
checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
|
||||||
buf = buf[checksumSize:]
|
buf = buf[checksumSize:]
|
||||||
|
@ -165,19 +156,19 @@ func (r *Reader) Read(p []byte) (int, error) {
|
||||||
n, err := DecodedLen(buf)
|
n, err := DecodedLen(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.err = err
|
r.err = err
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
if n > len(r.decoded) {
|
if n > len(r.decoded) {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
if _, err := Decode(r.decoded, buf); err != nil {
|
if _, err := Decode(r.decoded, buf); err != nil {
|
||||||
r.err = err
|
r.err = err
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
if crc(r.decoded[:n]) != checksum {
|
if crc(r.decoded[:n]) != checksum {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
r.i, r.j = 0, n
|
r.i, r.j = 0, n
|
||||||
continue
|
continue
|
||||||
|
@ -186,25 +177,25 @@ func (r *Reader) Read(p []byte) (int, error) {
|
||||||
// Section 4.3. Uncompressed data (chunk type 0x01).
|
// Section 4.3. Uncompressed data (chunk type 0x01).
|
||||||
if chunkLen < checksumSize {
|
if chunkLen < checksumSize {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
buf := r.buf[:checksumSize]
|
buf := r.buf[:checksumSize]
|
||||||
if !r.readFull(buf, false) {
|
if !r.readFull(buf, false) {
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
|
checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24
|
||||||
// Read directly into r.decoded instead of via r.buf.
|
// Read directly into r.decoded instead of via r.buf.
|
||||||
n := chunkLen - checksumSize
|
n := chunkLen - checksumSize
|
||||||
if n > len(r.decoded) {
|
if n > len(r.decoded) {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
if !r.readFull(r.decoded[:n], false) {
|
if !r.readFull(r.decoded[:n], false) {
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
if crc(r.decoded[:n]) != checksum {
|
if crc(r.decoded[:n]) != checksum {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
r.i, r.j = 0, n
|
r.i, r.j = 0, n
|
||||||
continue
|
continue
|
||||||
|
@ -213,15 +204,15 @@ func (r *Reader) Read(p []byte) (int, error) {
|
||||||
// Section 4.1. Stream identifier (chunk type 0xff).
|
// Section 4.1. Stream identifier (chunk type 0xff).
|
||||||
if chunkLen != len(magicBody) {
|
if chunkLen != len(magicBody) {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
if !r.readFull(r.buf[:len(magicBody)], false) {
|
if !r.readFull(r.buf[:len(magicBody)], false) {
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
for i := 0; i < len(magicBody); i++ {
|
for i := 0; i < len(magicBody); i++ {
|
||||||
if r.buf[i] != magicBody[i] {
|
if r.buf[i] != magicBody[i] {
|
||||||
r.err = ErrCorrupt
|
r.err = ErrCorrupt
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
|
@ -230,12 +221,44 @@ func (r *Reader) Read(p []byte) (int, error) {
|
||||||
if chunkType <= 0x7f {
|
if chunkType <= 0x7f {
|
||||||
// Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f).
|
// Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f).
|
||||||
r.err = ErrUnsupported
|
r.err = ErrUnsupported
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
// Section 4.4 Padding (chunk type 0xfe).
|
// Section 4.4 Padding (chunk type 0xfe).
|
||||||
// Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd).
|
// Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd).
|
||||||
if !r.readFull(r.buf[:chunkLen], false) {
|
if !r.readFull(r.buf[:chunkLen], false) {
|
||||||
return 0, r.err
|
return r.err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read satisfies the io.Reader interface.
|
||||||
|
func (r *Reader) Read(p []byte) (int, error) {
|
||||||
|
if r.err != nil {
|
||||||
|
return 0, r.err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := r.fill(); err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
n := copy(p, r.decoded[r.i:r.j])
|
||||||
|
r.i += n
|
||||||
|
return n, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadByte satisfies the io.ByteReader interface.
|
||||||
|
func (r *Reader) ReadByte() (byte, error) {
|
||||||
|
if r.err != nil {
|
||||||
|
return 0, r.err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := r.fill(); err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
c := r.decoded[r.i]
|
||||||
|
r.i++
|
||||||
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@ inner0:
|
||||||
|
|
||||||
// if load32(src, s) != load32(src, candidate) { continue } break
|
// if load32(src, s) != load32(src, candidate) { continue } break
|
||||||
MOVW 0(R7), R3
|
MOVW 0(R7), R3
|
||||||
MOVW (R6)(R15*1), R4
|
MOVW (R6)(R15), R4
|
||||||
CMPW R4, R3
|
CMPW R4, R3
|
||||||
BNE inner0
|
BNE inner0
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ inlineEmitCopyEnd:
|
||||||
MOVHU R3, 0(R17)(R11<<1)
|
MOVHU R3, 0(R17)(R11<<1)
|
||||||
|
|
||||||
// if uint32(x>>8) == load32(src, candidate) { continue }
|
// if uint32(x>>8) == load32(src, candidate) { continue }
|
||||||
MOVW (R6)(R15*1), R4
|
MOVW (R6)(R15), R4
|
||||||
CMPW R4, R14
|
CMPW R4, R14
|
||||||
BEQ inner1
|
BEQ inner1
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ github.com/golang/protobuf/ptypes/any
|
||||||
github.com/golang/protobuf/ptypes/duration
|
github.com/golang/protobuf/ptypes/duration
|
||||||
github.com/golang/protobuf/ptypes/timestamp
|
github.com/golang/protobuf/ptypes/timestamp
|
||||||
github.com/golang/protobuf/ptypes/wrappers
|
github.com/golang/protobuf/ptypes/wrappers
|
||||||
# github.com/golang/snappy v0.0.3
|
# github.com/golang/snappy v0.0.4-0.20210608040537-544b4180ac70
|
||||||
github.com/golang/snappy
|
github.com/golang/snappy
|
||||||
# github.com/google/go-cmp v0.5.5
|
# github.com/google/go-cmp v0.5.5
|
||||||
github.com/google/go-cmp/cmp
|
github.com/google/go-cmp/cmp
|
||||||
|
|
Loading…
Reference in New Issue