diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go index 33fbb90be4..e72bdfa2d6 100644 --- a/src/cmd/compile/internal/gc/main.go +++ b/src/cmd/compile/internal/gc/main.go @@ -626,13 +626,6 @@ func Main(archInit func(*Arch)) { compileFunctions() - // We autogenerate and compile some small functions - // such as method wrappers and equality/hash routines - // while exporting code. - // Disable concurrent compilation from here on, - // at least until this convoluted structure has been unwound. - nBackendWorkers = 1 - if nowritebarrierrecCheck != nil { // Write barriers are now known. Check the // call graph. diff --git a/src/cmd/compile/internal/gc/obj.go b/src/cmd/compile/internal/gc/obj.go index a694e61099..6b33f2467b 100644 --- a/src/cmd/compile/internal/gc/obj.go +++ b/src/cmd/compile/internal/gc/obj.go @@ -140,6 +140,17 @@ func dumpLinkerObj(bout *bio.Writer) { dumpimportstrings() dumpbasictypes() + // The first call to dumpsignats can generate functions, + // like method wrappers and hash and equality routines. + compileFunctions() + + // Process any new signats added during compilation. + // No need to loop here; signats from compiling the generated + // functions should not themselves generate new functions. + // If they do, we'll know about it; the sanity check of + // len(compilequeue) in gc.Main will fail. + dumpsignats() + // Dump extra globals. tmp := externdcl