bsc/internal/build
Felix Lange effaf18523
build: improve cross compilation setup (#22804)
This PR cleans up the CI build system and fixes a couple of issues.

- The go tool launcher code has been moved to internal/build. With the new
  toolchain functions, the environment of the host Go (i.e. the one that built
  ci.go) and the target Go (i.e. the toolchain downloaded by -dlgo) are isolated
  more strictly. This is important to make cross compilation and -dlgo work
  correctly in more cases.
- The -dlgo option now skips the download and uses the host Go if the running Go
  version matches dlgoVersion exactly.
- The 'test' command now supports -dlgo, -cc and -arch. Running unit tests with
  foreign GOARCH is occasionally useful. For example, it can be used to run
  32-bit tests on Windows. It can also be used to run darwin/amd64 tests on
  darwin/arm64 using Rosetta 2.
- The 'aar', 'xcode' and 'xgo' commands now use a slightly different method to
  install external tools. They previously used `go get`, but this comes with the
  annoying side effect of modifying go.mod. They now use `go install` instead,
  which is the recommended way of installing tools without modifying the local
  module.
- The old build warning about outdated Go version has been removed because we're
  much better at keeping backwards compatibility now.
2021-05-04 13:01:20 +02:00
..
archive.go build: add -dlgo flag in ci.go (#21824) 2020-11-11 14:34:43 +01:00
azure.go build/ci: handle split up listing (#21293) 2020-07-04 20:10:48 +02:00
download.go internal/build: don't crash in DownloadFile when offline (#20595) 2020-02-03 17:22:46 +02:00
env.go build: improve cross compilation setup (#22804) 2021-05-04 13:01:20 +02:00
gotool.go build: improve cross compilation setup (#22804) 2021-05-04 13:01:20 +02:00
pgp.go build: specify the key to use when invoking gpg:sign-and-deploy-file (#16696) 2018-05-09 01:13:53 +02:00
util.go build: improve cross compilation setup (#22804) 2021-05-04 13:01:20 +02:00