Skip to content

Commit 7e0a81d

Browse files
committed
[dev.regabi] all: merge master (dab3e5a) into dev.regabi
This merge had two conflicts to resolve: 1. The embed code on master had somewhat substantially diverged, so this CL tediously backported the changes to dev.regabi. In particular, I went through all of the embed changes to gc/{embed,noder,syntax}.go and made sure the analogous code on dev.regabi in noder/noder.go and staticdata/embed.go mirrors it. 2. The init-cycle reporting code on master was extended slightly to track already visited declarations to avoid exponential behavior. The same fix is applied on dev.regabi, just using ir.NameSet instead of map[ir.Node]bool. Conflicts: - src/cmd/compile/internal/gc/embed.go - src/cmd/compile/internal/gc/noder.go - src/cmd/compile/internal/gc/syntax.go - src/cmd/compile/internal/pkginit/initorder.go - src/embed/internal/embedtest/embed_test.go - src/go/types/stdlib_test.go Merge List: + 2021-01-22 dab3e5a runtime: switch runtime to libc for openbsd/amd64 + 2021-01-22 a1b53d8 cmd/go: add documentation for test and xtest fields output by go list + 2021-01-22 b268b60 runtime: remove pthread_kill/pthread_self for openbsd + 2021-01-22 ec40517 runtime: fix typo in mgcscavenge.go + 2021-01-22 7ece3a7 net/http: fix flaky TestDisableKeepAliveUpgrade + 2021-01-22 50cba05 time: clarify Timer.Reset behavior on AfterFunc Timers + 2021-01-22 cf10e69 doc/go1.16: mention net/http.Transport.GetProxyConnectHeader + 2021-01-22 ec1b945 doc/go1.16: mention path/filepath.WalkDir + 2021-01-22 11def3d doc/go1.16: mention syscall.AllThreadsSyscall + 2021-01-21 07b0235 doc/go1.16: add notes about package-specific fs.FS changes + 2021-01-21 e2b4f1f doc/go1.16: minor formatting fix + 2021-01-21 9f43a9e doc/go1.16: mention new debug/elf constants + 2021-01-21 3c2f11b cmd/go: overwrite program name with full path + 2021-01-21 953d1fe all: introduce and use internal/execabs + 2021-01-21 b186e4d cmd/go: add test case for cgo CC setting + 2021-01-21 5a8a226 cmd/cgo: report exec errors a bit more clearly + 2021-01-21 46e2e2e cmd/go: pass resolved CC, GCCGO to cgo + 2021-01-21 3d40895 runtime: switch openbsd/arm64 to pthreads + 2021-01-21 d95ca91 crypto/elliptic: fix P-224 field reduction + 2021-01-20 ecf4ebf cmd/internal/moddeps: check content of all modules in GOROOT + 2021-01-20 d2d155d runtime: don't adjust timer pp field in timerWaiting status + 2021-01-20 803d18f cmd/go: set Incomplete field on go list output if no files match embed + 2021-01-20 6e243ce cmd/go: have go mod vendor copy embedded files in subdirs + 2021-01-20 be28e5a cmd/go: fix mod_get_fallback test + 2021-01-20 928bda4 runtime: convert openbsd/amd64 locking to libc + 2021-01-19 824f2d6 cmd/go: allow go fmt to complete when embedded file is missing + 2021-01-19 0575e35 cmd/compile: require 'go 1.16' go.mod line for //go:embed + 2021-01-19 ccb2e90 cmd/link: exit before Asmb2 if error + 2021-01-19 ca5774a embed: treat uninitialized FS as empty + 2021-01-19 d047c91 cmd/link,runtime: switch openbsd/amd64 to pthreads + 2021-01-19 61debff runtime: factor out usesLibcall + 2021-01-19 9fed39d runtime: factor out mStackIsSystemAllocated + 2021-01-18 dbab079 runtime: free Windows event handles after last lock is dropped + 2021-01-18 5a8fbb0 os: do not close syscall.Stdin in TestReadStdin + 2021-01-15 682a1d2 runtime: detect errors in DuplicateHandle + 2021-01-15 9f83418 cmd/link: remove GOROOT write in TestBuildForTvOS + 2021-01-15 ec94701 cmd/compile: allow embed into any string or byte slice type + 2021-01-15 54198b0 cmd/compile: disallow embed of var inside func + 2021-01-15 b386c73 cmd/go: fix go generate docs + 2021-01-15 bb5075a syscall: remove RtlGenRandom and move it into internal/syscall + 2021-01-15 1deae0b os: invoke processKiller synchronously in testKillProcess + 2021-01-15 ff196c3 crypto/x509: update iOS bundled roots to version 55188.40.9 + 2021-01-14 e125ccd cmd/go: in 'go mod edit', validate versions given to -retract and -exclude + 2021-01-14 eb33002 cmd/dist, cmd/go: pass -arch for C compilation on Darwin + 2021-01-14 84e8a06 cmd/cgo: remove unnecessary space in cgo export header + 2021-01-14 0c86b99 cmd/test2json: document passing -test.paniconexit0 + 2021-01-14 9135795 cmd/go/internal/load: report positions for embed errors + 2021-01-14 d9b79e5 cmd/compile: fix wrong complement for arm64 floating-point comparisons + 2021-01-14 c73232d cmd/go/internal/load: refactor setErrorPos to PackageError.setPos + 2021-01-14 6aa28d3 go/build: report positions for go:embed directives + 2021-01-13 7eb31d9 cmd/go: add hints to more missing sum error messages + 2021-01-12 ba76567 cmd/go/internal/modload: delete unused *mvsReqs.next method + 2021-01-12 665def2 encoding/asn1: document unmarshaling behavior for IMPLICIT string fields + 2021-01-11 81ea89a cmd/go: fix non-script staleness checks interacting badly with GOFLAGS + 2021-01-11 7593090 doc: update editors.html for Go 1.16 + 2021-01-11 c3b4c70 cmd/internal/objfile: don't require runtime.symtab symbol for XCOFF + 2021-01-08 59bfc18 cmd/go: add hint to read 'go help vcs' to GOVCS errors + 2021-01-08 cd6f3a5 cmd/go: revise 'go help' documentation for modules + 2021-01-08 6192b98 cmd/go: make hints in error messages more consistent + 2021-01-08 25886cf cmd/go: preserve sums for indirect deps fetched by 'go mod download' + 2021-01-08 6250833 runtime/metrics: mark histogram metrics as cumulative + 2021-01-08 8f6a9ac runtime/metrics: remove unused StopTheWorld Description field + 2021-01-08 6598c65 cmd/compile: fix exponential-time init-cycle reporting + 2021-01-08 fefad1d test: fix timeout code for invoking compiler + 2021-01-08 6728118 cmd/go: pass signals forward during "go tool" + 2021-01-08 e65c543 go/build/constraint: add parser for build tag constraint expressions + 2021-01-08 0c5afc4 testing/fstest,os: clarify racy behavior of TestFS + 2021-01-08 32afcc9 runtime/metrics: change unit on *-by-size metrics to match bucket unit + 2021-01-08 c6513bc io/fs: minor corrections to Glob doc + 2021-01-08 304f769 cmd/compile: don't short-circuit copies whose source is volatile + 2021-01-08 ae97717 runtime,runtime/metrics: use explicit histogram boundaries + 2021-01-08 a9ccd2d go/build: skip string literal while findEmbed + 2021-01-08 d92f8ad archive/tar: fix typo in comment + 2021-01-08 cab1202 cmd/link: accept extra blocks in TestFallocate + 2021-01-08 ee4d322 io/fs: minor corrections to Glob release date + 2021-01-08 54bd1cc cmd: update to latest golang.org/x/tools + 2021-01-07 9ec21a8 Revert "reflect: support multiple keys in struct tags" + 2021-01-07 091414b io/fs: correct WalkDirFunc documentation + 2021-01-07 9b55088 doc/go1.16: add release note for disallowing non-ASCII import paths + 2021-01-07 fa90aac cmd/compile: fix late expand_calls leaf type for OpStructSelect/OpArraySelect + 2021-01-07 7cee66d cmd/go: add documentation for Embed fields in go list output + 2021-01-07 e60cffa html/template: attach functions to namespace + 2021-01-07 6da2d3b cmd/link: fix typo in asm.go + 2021-01-07 df81a15 runtime: check mips64 VDSO clock_gettime return code + 2021-01-06 4787e90 crypto/x509: rollback new CertificateRequest fields + 2021-01-06 c9658be cmd/go: make module suggestion more friendly + 2021-01-06 4c668b2 runtime/metrics: fix panic message for Float64Histogram + 2021-01-06 d213170 net/http/httputil: fix deadlock in DumpRequestOut + 2021-01-05 3e1e13c cmd/go: set cfg.BuildMod to "readonly" by default with no module root + 2021-01-05 0b0d004 cmd/go: pass embedcfg to gccgo if supported + 2021-01-05 1b85e7c cmd/go: don't scan gccgo standard library packages for imports + 2021-01-05 6b37b15 runtime: don't take allglock in tracebackothers + 2021-01-04 9eef49c math/rand: fix typo in comment + 2021-01-04 b01fb2a testing/fstest: fix typo in error message + 2021-01-01 3dd5867 doc: 2021 is the Year of the Gopher + 2020-12-31 95ce805 io/fs: remove darwin/arm64 special condition + 2020-12-30 20d0991 lib/time, time/tzdata: update tzdata to 2020f + 2020-12-30 ed30173 misc/cgo/testcarchive: remove special flags for Darwin/ARM + 2020-12-30 0ae2e03 misc/cgo/test: enable TestCrossPackageTests on darwin/arm64 + 2020-12-29 780b4de misc/ios: fix wording for command line instructions + 2020-12-29 b4a71c9 doc/go1.16: reference misc/ios/README for how to build iOS programs + 2020-12-29 f83e0f6 misc/ios: add to README how to build ios executables + 2020-12-28 4fd9455 io/fs: fix typo in comment Change-Id: I2f257bbc5fbb05f15c2d959f8cfe0ce13b083538
2 parents d7e71c0 + dab3e5a commit 7e0a81d

File tree

234 files changed

+7372
-5451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+7372
-5451
lines changed

api/go1.16.txt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
pkg archive/zip, method (*ReadCloser) Open(string) (fs.File, error)
22
pkg archive/zip, method (*Reader) Open(string) (fs.File, error)
33
pkg crypto/x509, method (SystemRootsError) Unwrap() error
4-
pkg crypto/x509, type CertificateRequest struct, BasicConstraintsValid bool
5-
pkg crypto/x509, type CertificateRequest struct, ExtKeyUsage []ExtKeyUsage
6-
pkg crypto/x509, type CertificateRequest struct, IsCA bool
7-
pkg crypto/x509, type CertificateRequest struct, KeyUsage KeyUsage
8-
pkg crypto/x509, type CertificateRequest struct, MaxPathLen int
9-
pkg crypto/x509, type CertificateRequest struct, MaxPathLenZero bool
10-
pkg crypto/x509, type CertificateRequest struct, PolicyIdentifiers []asn1.ObjectIdentifier
11-
pkg crypto/x509, type CertificateRequest struct, SubjectKeyId []uint8
12-
pkg crypto/x509, type CertificateRequest struct, UnknownExtKeyUsage []asn1.ObjectIdentifier
134
pkg debug/elf, const DT_ADDRRNGHI = 1879047935
145
pkg debug/elf, const DT_ADDRRNGHI DynTag
156
pkg debug/elf, const DT_ADDRRNGLO = 1879047680
@@ -235,9 +226,12 @@ pkg embed, type FS struct
235226
pkg flag, func Func(string, string, func(string) error)
236227
pkg flag, method (*FlagSet) Func(string, string, func(string) error)
237228
pkg go/build, type Package struct, EmbedPatterns []string
229+
pkg go/build, type Package struct, EmbedPatternPos map[string][]token.Position
238230
pkg go/build, type Package struct, IgnoredOtherFiles []string
239231
pkg go/build, type Package struct, TestEmbedPatterns []string
232+
pkg go/build, type Package struct, TestEmbedPatternPos map[string][]token.Position
240233
pkg go/build, type Package struct, XTestEmbedPatterns []string
234+
pkg go/build, type Package struct, XTestEmbedPatternPos map[string][]token.Position
241235
pkg html/template, func ParseFS(fs.FS, ...string) (*Template, error)
242236
pkg html/template, method (*Template) ParseFS(fs.FS, ...string) (*Template, error)
243237
pkg io, func NopCloser(Reader) ReadCloser
@@ -404,7 +398,6 @@ pkg runtime/metrics, type Description struct, Cumulative bool
404398
pkg runtime/metrics, type Description struct, Description string
405399
pkg runtime/metrics, type Description struct, Kind ValueKind
406400
pkg runtime/metrics, type Description struct, Name string
407-
pkg runtime/metrics, type Description struct, StopTheWorld bool
408401
pkg runtime/metrics, type Float64Histogram struct
409402
pkg runtime/metrics, type Float64Histogram struct, Buckets []float64
410403
pkg runtime/metrics, type Float64Histogram struct, Counts []uint64
@@ -437,10 +430,8 @@ pkg syscall (linux-arm-cgo), func AllThreadsSyscall(uintptr, uintptr, uintptr, u
437430
pkg syscall (linux-arm-cgo), func AllThreadsSyscall6(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) (uintptr, uintptr, Errno)
438431
pkg syscall (linux-arm-cgo), func Setegid(int) error
439432
pkg syscall (linux-arm-cgo), func Seteuid(int) error
440-
pkg syscall (windows-386), func RtlGenRandom(*uint8, uint32) error
441433
pkg syscall (windows-386), method (*DLLError) Unwrap() error
442434
pkg syscall (windows-386), type SysProcAttr struct, NoInheritHandles bool
443-
pkg syscall (windows-amd64), func RtlGenRandom(*uint8, uint32) error
444435
pkg syscall (windows-amd64), method (*DLLError) Unwrap() error
445436
pkg syscall (windows-amd64), type SysProcAttr struct, NoInheritHandles bool
446437
pkg testing/fstest, func TestFS(fs.FS, ...string) error

doc/contribute.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,13 +1023,13 @@ <h3 id="copyright">Copyright headers</h3>
10231023
</p>
10241024

10251025
<pre>
1026-
// Copyright 2020 The Go Authors. All rights reserved.
1026+
// Copyright 2021 The Go Authors. All rights reserved.
10271027
// Use of this source code is governed by a BSD-style
10281028
// license that can be found in the LICENSE file.
10291029
</pre>
10301030

10311031
<p>
1032-
(Use the current year if you're reading this in 2021 or beyond.)
1032+
(Use the current year if you're reading this in 2022 or beyond.)
10331033
Files in the repository are copyrighted the year they are added.
10341034
Do not update the copyright year on files that you change.
10351035
</p>

doc/editors.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ <h2 id="options">Options</h2>
1919
</p>
2020

2121
<ul>
22-
<li><a href="https://github.com/fatih/vim-go">vim</a>: vim-go plugin provides Go programming language support</li>
2322
<li><a href="https://marketplace.visualstudio.com/items?itemName=golang.go">Visual Studio Code</a>:
2423
Go extension provides support for the Go programming language</li>
2524
<li><a href="https://www.jetbrains.com/go">GoLand</a>: GoLand is distributed either as a standalone IDE
2625
or as a plugin for IntelliJ IDEA Ultimate</li>
27-
<li><a href="https://atom.io/packages/go-plus">Atom</a>: Go-Plus is an Atom package that provides enhanced Go support</li>
28-
</ul>
26+
<li><a href="https://github.com/fatih/vim-go">vim</a>: vim-go plugin provides Go programming language support</li>
2927

3028
<p>
3129
Note that these are only a few top solutions; a more comprehensive

doc/go1.16.html

Lines changed: 95 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ <h3 id="darwin">Darwin and iOS</h3>
5555
Go 1.16 adds an <code>ios/amd64</code> port, which targets the iOS
5656
simulator running on AMD64-based macOS. Previously this was
5757
unofficially supported through <code>darwin/amd64</code> with
58-
the <code>ios</code> build tag set.
58+
the <code>ios</code> build tag set. See also
59+
<a href="/misc/ios/README"><code>misc/ios/README</code></a> for
60+
details about how to build programs for iOS and iOS simulator.
5961
</p>
6062

6163
<p><!-- golang.org/issue/23011 -->
@@ -162,6 +164,12 @@ <h4 id="modules">Modules</h4>
162164
non-reproducible builds.
163165
</p>
164166

167+
<p><!-- golang.org/issue/43052 -->
168+
The <code>go</code> command now disallows non-ASCII import paths in module
169+
mode. Non-ASCII module paths have already been disallowed so this change
170+
affects module subdirectory paths that contain non-ASCII characters.
171+
</p>
172+
165173
<h4 id="embed">Embedding Files</h4>
166174

167175
<p>
@@ -504,6 +512,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
504512
in mind.
505513
</p>
506514

515+
<dl id="archive/zip"><dt><a href="/pkg/archive/zip/">archive/zip</a></dt>
516+
<dd>
517+
<p><!-- CL 243937 -->
518+
The new <a href="/pkg/archive/zip/#Reader.Open"><code>Reader.Open</code></a>
519+
method implements the <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a>
520+
interface.
521+
</p>
522+
</dd>
523+
</dl>
524+
507525
<dl id="crypto/dsa"><dt><a href="/pkg/crypto/dsa/">crypto/dsa</a></dt>
508526
<dd>
509527
<p><!-- CL 257939 -->
@@ -588,14 +606,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
588606
a malformed certificate.
589607
</p>
590608

591-
<p><!-- CL 233163 -->
592-
A number of additional fields have been added to the
593-
<a href="/pkg/crypto/x509/#CertificateRequest"><code>CertificateRequest</code></a> type.
594-
These fields are now parsed in <a href="/pkg/crypto/x509/#ParseCertificateRequest">
595-
<code>ParseCertificateRequest</code></a> and marshalled in
596-
<a href="/pkg/crypto/x509/#CreateCertificateRequest"><code>CreateCertificateRequest</code></a>.
597-
</p>
598-
599609
<p><!-- CL 257939 -->
600610
DSA signature verification is no longer supported. Note that DSA signature
601611
generation was never supported.
@@ -616,6 +626,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
616626
</dd>
617627
</dl><!-- crypto/x509 -->
618628

629+
<dl id="debug/elf"><dt><a href="/pkg/debug/elf/">debug/elf</a></dt>
630+
<dd>
631+
<p><!-- CL 255138 -->
632+
More <a href="/pkg/debug/elf/#DT_NULL"><code>DT</code></a>
633+
and <a href="/pkg/debug/elf/#PT_NULL"><code>PT</code></a>
634+
constants have been added.
635+
</p>
636+
</dd>
637+
</dl><!-- debug/elf -->
638+
619639
<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1">encoding/asn1</a></dt>
620640
<dd>
621641
<p><!-- CL 255881 -->
@@ -665,6 +685,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
665685
</dd>
666686
</dl><!-- flag -->
667687

688+
<dl id="html/template"><dt><a href="/pkg/html/template/">html/template</a></dt>
689+
<dd>
690+
<p><!-- CL 243938 -->
691+
The new <a href="/pkg/html/template/#ParseFS"><code>template.ParseFS</code></a>
692+
function and <a href="/pkg/html/template/#Template.ParseFS"><code>template.Template.ParseFS</code></a>
693+
method are like <a href="/pkg/html/template/#ParseGlob"><code>template.ParseGlob</code></a>
694+
and <a href="/pkg/html/template/#Template.ParseGlob"><code>template.Template.ParseGlob</code></a>,
695+
but read the templates from an <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a>.
696+
</p>
697+
</dd>
698+
</dl><!-- html/template -->
699+
668700
<dl id="io"><dt><a href="/pkg/io/">io</a></dt>
669701
<dd>
670702
<p><!-- CL 261577 -->
@@ -774,6 +806,25 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
774806
environment variable for <code>https://</code> URLs when
775807
<code>HTTPS_PROXY</code> is unset.
776808
</p>
809+
810+
<p><!-- 259917 -->
811+
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
812+
type has a new field
813+
<a href="/pkg/net/http/#Transport.GetProxyConnectHeader"><code>GetProxyConnectHeader</code></a>
814+
which may be set to a function that returns headers to send to a
815+
proxy during a <code>CONNECT</code> request.
816+
In effect <code>GetProxyConnectHeader</code> is a dynamic
817+
version of the existing field
818+
<a href="/pkg/net/http/#Transport.ProxyConnectHeader"><code>ProxyConnectHeader</code></a>;
819+
if <code>GetProxyConnectHeader</code> is not <code>nil</code>,
820+
then <code>ProxyConnectHeader</code> is ignored.
821+
</p>
822+
823+
<p><!-- CL 243939 -->
824+
The new <a href="/pkg/net/http/#FS"><code>http.FS</code></a>
825+
function converts an <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a>
826+
to an <a href="/pkg/net/http/#Handler"><code>http.Handler</code></a>.
827+
</p>
777828
</dd>
778829
</dl><!-- net/http -->
779830

@@ -834,6 +885,21 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
834885

835886
<dl id="path/filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
836887
<dd>
888+
<p><!-- CL 267887 -->
889+
The new function
890+
<a href="/pkg/path/filepath/WalkDir"><code>WalkDir</code></a>
891+
is similar to
892+
<a href="/pkg/path/filepath/Walk"><code>Walk</code></a>,
893+
but is typically more efficient.
894+
The function passed to <code>WalkDir</code> receives a
895+
<a href="/pkg/io/fs/#DirEntry"><code>fs.DirEntry</code></a>
896+
instead of a
897+
<a href="/pkg/io/fs/#FileInfo"><code>fs.FileInfo</code></a>.
898+
(To clarify for those who recall the <code>Walk</code> function
899+
as taking an <a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a>,
900+
<code>os.FileInfo</code> is now an alias for <code>fs.FileInfo</code>.)
901+
</p>
902+
837903
<p><!-- CL 264397, golang.org/issues/28614 -->
838904
The <a href="/pkg/path/filepath#Match"><code>Match</code></a> and
839905
<a href="/pkg/path/filepath#Glob"><code>Glob</code></a> functions now
@@ -845,17 +911,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
845911
</dd>
846912
</dl><!-- path/filepath -->
847913

848-
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
849-
<dd>
850-
<p><!-- CL 248341, golang.org/issues/40281 -->
851-
<a href="/pkg/reflect/#StructTag"><code>StructTag</code></a>
852-
now allows multiple space-separated keys in key:value pairs,
853-
as in <code>`json xml:"field1"`</code> (equivalent to
854-
<code>`json:"field1" xml:"field1"`</code>).
855-
</p>
856-
</dd>
857-
</dl><!-- reflect -->
858-
859914
<dl id="runtime/debug"><dt><a href="/pkg/runtime/debug/">runtime/debug</a></dt>
860915
<dd>
861916
<p><!-- CL 249677 -->
@@ -893,11 +948,11 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
893948
</p>
894949

895950
<p><!-- CL 261917 -->
896-
<a href="/pkg/syscall/?GOOS=windows#SysProcAttr"><code>SysProcAttr</code></a> on Windows has a new NoInheritHandles field that disables inheriting handles when creating a new process.
951+
<a href="/pkg/syscall/?GOOS=windows#SysProcAttr"><code>SysProcAttr</code></a> on Windows has a new <code>NoInheritHandles</code> field that disables inheriting handles when creating a new process.
897952
</p>
898953

899954
<p><!-- CL 269761, golang.org/issue/42584 -->
900-
<a href="/pkg/syscall/?GOOS=windows#DLLError"><code>DLLError</code></a> on Windows now has an Unwrap function for unwrapping its underlying error.
955+
<a href="/pkg/syscall/?GOOS=windows#DLLError"><code>DLLError</code></a> on Windows now has an <code>Unwrap</code> method for unwrapping its underlying error.
901956
</p>
902957

903958
<p><!-- CL 210639 -->
@@ -907,6 +962,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
907962
and related calls are now implemented.
908963
Previously, they returned an <code>syscall.EOPNOTSUPP</code> error.
909964
</p>
965+
966+
<p><!-- CL 210639 -->
967+
On Linux, the new functions
968+
<a href="/pkg/syscall/#AllThreadsSyscall"><code>AllThreadsSyscall</code></a>
969+
and <a href="/pkg/syscall/#AllThreadsSyscall6"><code>AllThreadsSyscall6</code></a>
970+
may be used to make a system call on all Go threads in the process.
971+
These functions may only be used by programs that do not use cgo;
972+
if a program uses cgo, they will always return
973+
<a href="/pkg/syscall/#ENOTSUP"><code>syscall.ENOTSUP</code></a>.
974+
</p>
910975
</dd>
911976
</dl><!-- syscall -->
912977

@@ -916,6 +981,14 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
916981
Newlines characters are now allowed inside action delimiters,
917982
permitting actions to span multiple lines.
918983
</p>
984+
985+
<p><!-- CL 243938 -->
986+
The new <a href="/pkg/text/template/#ParseFS"><code>template.ParseFS</code></a>
987+
function and <a href="/pkg/text/template/#Template.ParseFS"><code>template.Template.ParseFS</code></a>
988+
method are like <a href="/pkg/text/template/#ParseGlob"><code>template.ParseGlob</code></a>
989+
and <a href="/pkg/text/template/#Template.ParseGlob"><code>template.Template.ParseGlob</code></a>,
990+
but read the templates from an <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a>.
991+
</p>
919992
</dd>
920993
</dl><!-- text/template -->
921994

lib/time/update.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# Consult https://www.iana.org/time-zones for the latest versions.
99

1010
# Versions to use.
11-
CODE=2020e
12-
DATA=2020e
11+
CODE=2020f
12+
DATA=2020f
1313

1414
set -e
1515
rm -rf work

lib/time/zoneinfo.zip

0 Bytes
Binary file not shown.

misc/cgo/test/pkg_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestCrossPackageTests(t *testing.T) {
3030
switch runtime.GOOS {
3131
case "android":
3232
t.Skip("Can't exec cmd/go subprocess on Android.")
33-
case "darwin", "ios":
33+
case "ios":
3434
switch runtime.GOARCH {
3535
case "arm64":
3636
t.Skip("Can't exec cmd/go subprocess on iOS.")

misc/cgo/testcarchive/carchive_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ func testMain(m *testing.M) int {
118118
cc = append(cc, s[start:])
119119
}
120120

121-
if GOOS == "darwin" || GOOS == "ios" {
122-
// For Darwin/ARM.
123-
// TODO: do we still need this?
124-
cc = append(cc, []string{"-framework", "CoreFoundation", "-framework", "Foundation"}...)
125-
}
126121
if GOOS == "aix" {
127122
// -Wl,-bnoobjreorder is mandatory to keep the same layout
128123
// in .text section.

misc/ios/README

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ set to the clang wrapper that invokes clang for iOS. For example, this command r
77

88
GOOS=ios GOARCH=amd64 CGO_ENABLED=1 CC_FOR_TARGET=$(pwd)/../misc/ios/clangwrap.sh ./all.bash
99

10+
If CC_FOR_TARGET is not set when the toolchain is built (make.bash or all.bash), CC
11+
can be set on the command line. For example,
12+
13+
GOOS=ios GOARCH=amd64 CGO_ENABLED=1 CC=$(go env GOROOT)/misc/ios/clangwrap.sh go build
14+
15+
Setting CC is not necessary if the toolchain is built with CC_FOR_TARGET set.
16+
1017
To use the go tool to run individual programs and tests, put $GOROOT/bin into PATH to ensure
1118
the go_ios_$GOARCH_exec wrapper is found. For example, to run the archive/tar tests:
1219

src/archive/tar/strconv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func isASCII(s string) bool {
2828
}
2929

3030
// toASCII converts the input to an ASCII C-style string.
31-
// This a best effort conversion, so invalid characters are dropped.
31+
// This is a best effort conversion, so invalid characters are dropped.
3232
func toASCII(s string) string {
3333
if isASCII(s) {
3434
return s

src/cmd/api/goapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import (
1616
"go/parser"
1717
"go/token"
1818
"go/types"
19+
exec "internal/execabs"
1920
"io"
2021
"log"
2122
"os"
22-
"os/exec"
2323
"path/filepath"
2424
"regexp"
2525
"runtime"

src/cmd/api/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ package main
1010

1111
import (
1212
"fmt"
13+
exec "internal/execabs"
1314
"log"
1415
"os"
15-
"os/exec"
1616
"path/filepath"
1717
"runtime"
1818
"strings"

src/cmd/cgo/gcc.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,14 @@ func (p *Package) gccBaseCmd() []string {
15491549
func (p *Package) gccMachine() []string {
15501550
switch goarch {
15511551
case "amd64":
1552+
if goos == "darwin" {
1553+
return []string{"-arch", "x86_64", "-m64"}
1554+
}
15521555
return []string{"-m64"}
1556+
case "arm64":
1557+
if goos == "darwin" {
1558+
return []string{"-arch", "arm64"}
1559+
}
15531560
case "386":
15541561
return []string{"-m32"}
15551562
case "arm":

src/cmd/cgo/out.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"go/ast"
1515
"go/printer"
1616
"go/token"
17+
exec "internal/execabs"
1718
"internal/xcoff"
1819
"io"
1920
"os"
20-
"os/exec"
2121
"path/filepath"
2222
"regexp"
2323
"sort"
@@ -953,9 +953,9 @@ func (p *Package) writeExports(fgo2, fm, fgcc, fgcch io.Writer) {
953953
// Build the wrapper function compiled by gcc.
954954
gccExport := ""
955955
if goos == "windows" {
956-
gccExport = "__declspec(dllexport)"
956+
gccExport = "__declspec(dllexport) "
957957
}
958-
s := fmt.Sprintf("%s %s %s(", gccExport, gccResult, exp.ExpName)
958+
s := fmt.Sprintf("%s%s %s(", gccExport, gccResult, exp.ExpName)
959959
if fn.Recv != nil {
960960
s += p.cgoType(fn.Recv.List[0].Type).C.String()
961961
s += " recv"

0 commit comments

Comments
 (0)