Build arm + arm64 binaries for linux and windows (#790)
* Build arm + arm64 binaries for linux and windows * Type MaxInt64 to avoid overflow on 32 bits arch On a 32 bits arch, math.MaxIn64 is interpreted as an int, and therefore overflows. This causes compilation to build on those platforms.
This commit is contained in:
@@ -16,7 +16,11 @@ builds:
|
|||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
targets:
|
targets:
|
||||||
- linux_amd64
|
- linux_amd64
|
||||||
|
- linux_arm64
|
||||||
|
- linux_arm
|
||||||
- windows_amd64
|
- windows_amd64
|
||||||
|
- windows_arm64
|
||||||
|
- windows_arm
|
||||||
- darwin_amd64
|
- darwin_amd64
|
||||||
- darwin_arm64
|
- darwin_arm64
|
||||||
- id: tomljson
|
- id: tomljson
|
||||||
@@ -31,7 +35,11 @@ builds:
|
|||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
targets:
|
targets:
|
||||||
- linux_amd64
|
- linux_amd64
|
||||||
|
- linux_arm64
|
||||||
|
- linux_arm
|
||||||
- windows_amd64
|
- windows_amd64
|
||||||
|
- windows_arm64
|
||||||
|
- windows_arm
|
||||||
- darwin_amd64
|
- darwin_amd64
|
||||||
- darwin_arm64
|
- darwin_arm64
|
||||||
- id: jsontoml
|
- id: jsontoml
|
||||||
@@ -46,7 +54,11 @@ builds:
|
|||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
targets:
|
targets:
|
||||||
- linux_amd64
|
- linux_amd64
|
||||||
|
- linux_arm64
|
||||||
|
- linux_arm
|
||||||
- windows_amd64
|
- windows_amd64
|
||||||
|
- windows_arm64
|
||||||
|
- windows_arm
|
||||||
- darwin_amd64
|
- darwin_amd64
|
||||||
- darwin_arm64
|
- darwin_arm64
|
||||||
universal_binaries:
|
universal_binaries:
|
||||||
|
|||||||
+1
-1
@@ -312,7 +312,7 @@ func (enc *Encoder) encode(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, e
|
|||||||
case reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uint:
|
case reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uint:
|
||||||
x := v.Uint()
|
x := v.Uint()
|
||||||
if x > uint64(math.MaxInt64) {
|
if x > uint64(math.MaxInt64) {
|
||||||
return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, math.MaxInt64)
|
return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, int64(math.MaxInt64))
|
||||||
}
|
}
|
||||||
b = strconv.AppendUint(b, x, 10)
|
b = strconv.AppendUint(b, x, 10)
|
||||||
case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int:
|
case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int:
|
||||||
|
|||||||
Reference in New Issue
Block a user