Commit c4e41c3
committed
main/build: Use latest Go1.25 features if possible.
In order to avoid breaking backwards compatibility, newer versions of Go
toolchains automatically set GODEBUG flags to disable any changes that
are not strictly backwards compatible when compiling old code. However,
it is often the case that older code will work properly with the new
features and security updates enabled and those updates are generally
desirable.
The existing code in the main module will all work properly with all
changes in Go1.25, so this adds a directive when building with Go1.25 or
newer to override and remove the default GODEBUG flags which disable
newer features and security updates that are not strictly backwards
compatible. In other words, it ensure the new features and security
updates implemented in Go1.25 are enabled when building with Go 1.25 or
newer.
The specific GODEBUG flags removed are:
- `containermaxprocs=0`
- `decoratemappings=0`
- `tlssha1=1`
- `updatemaxprocs=0`
- `x509sha256skid=0`1 parent ad2a2b6 commit c4e41c3
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments