aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2023-03-06 15:44:27 +0100
committerRon Evans <[email protected]>2023-03-06 18:48:55 +0100
commit192a55970faec623d9ecf4dcd6190b44e71070c5 (patch)
treef70df4646172071ffdcf345bfd436eedb2d0db23 /main.go
parent8babc47638bdcc0b4a8688cdf2246d7ad29a8ff5 (diff)
downloadtinygo-192a55970faec623d9ecf4dcd6190b44e71070c5.tar.gz
tinygo-192a55970faec623d9ecf4dcd6190b44e71070c5.zip
windows: disable parallelism on Windows
This is an attempt to figure out why the Windows CI keeps crashing. It should be removed before the next release, by which point we should know whether this has helped or not.
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.go b/main.go
index 3bfea182a..481e92ba7 100644
--- a/main.go
+++ b/main.go
@@ -1508,6 +1508,15 @@ func main() {
defer pprof.StopCPUProfile()
}
+ // Limit the number of threads to one.
+ // This is an attempted workaround for the crashes we're seeing in CI on
+ // Windows. If this change helps, it indicates there is a concurrency issue.
+ // If it doesn't, then there is something else going on. Either way, this
+ // should be removed once the test is done.
+ if runtime.GOOS == "windows" {
+ runtime.GOMAXPROCS(1)
+ }
+
switch command {
case "build":
pkgName := "."