Home / Go / Building Go from source on Windows edit
Try Documentalist, my app that offers fast, offline access to 190+ programmer API docs.

In a cmd.exe (not PowerShell, because it screws things up):
  • checkout latest Go sources git checkout https://github.com/golang/go.git
  • cd go\src
  • add gcc to PATH by running c:\MinGW\set_distro_paths.bat
    • set GOROOT_BOOTSTRAP=C:\Go in cmd.exe
    • $env:GOROOT_BOOTSTRAP = "c:\Go" in powershell
  • all.bat : this builds Go and runs the tests
Running just runtime tests, in powershell:
  • $env:GOROOT = "C:\Users\kjk\src\go"
  • . "${env:GOROOT}\bin\go" test -c runtime
  • . "${env:GOROOT}\bin\go" test -c runtime -ldflags=-linkmode=external
  • $env:TEST_G0_STACK_OVERFLOW = "1"
  • gdb --args .\runtime.test.exe "-test.run" TestG0StackOverflow
  • .\runtime.test.exe "-test.run" TestRuntimePanic
  • In gdb:
    • br runtime.badmorestackg0

Feedback about page:

Optional: your email if you want me to get back to you:

Need fast, offline access to 190+ programmer API docs? Try my app Documentalist for Windows