build: build Go SSA serially [issue 3895]

From
https://github.com/tinygo-org/tinygo/pull/3915#issuecomment-1724405109

According to Ayke, it slows down the build but seems to reliably fix https://github.com/tinygo-org/tinygo/issues/3895
Этот коммит содержится в:
Dan Kegel 2023-09-20 10:55:49 -07:00 коммит произвёл Ron Evans
родитель 42da7654ec
коммит 13a8eae0d4

Просмотреть файл

@ -344,6 +344,10 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
}
packageActionIDJobs[pkg.ImportPath] = packageActionIDJob
// Build the SSA for the given package.
ssaPkg := program.Package(pkg.Pkg)
ssaPkg.Build()
// Now create the job to actually build the package. It will exit early
// if the package is already compiled.
job := &compileJob{