aboutsummaryrefslogtreecommitdiffhomepage
path: root/loader/list.go
AgeCommit message (Collapse)Author
2024-02-19compileopts: always enable CGoAyke van Laethem
CGo is needed for the rp2040 and for macOS (GOOS=darwin), without it these targets just won't work. And there really isn't a benefit from disabling CGo: we don't need any external linkers for example. This avoids a somewhat common issue of people having CGO_ENABLED=0 somewhere in their environment and not understanding why things don't work. See for example: https://github.com/tinygo-org/tinygo/issues/3450
2022-01-23main (test): integrate test corpus runnerNia Waldvogel
This allows us to test a large corpus of external packages against the compiler.
2022-01-19loader: respect $GOROOT when running `go list`Ayke van Laethem
This makes it possible to select the Go version using GOROOT, and works even if the `go` binary is not in $PATH.
2020-09-03loader: rewrite/refactor much of the code to use go list directlyAyke van Laethem
There were a few problems with the go/packages package. While it is more or less designed for our purpose, it didn't work quite well as it didn't provide access to indirectly imported packages (most importantly the runtime package). This led to a workaround that sometimes broke `tinygo test`. This PR contains a number of related changes: * It uses `go list` directly to retrieve the list of packages/files to compile, instead of relying on the go/packages package. * It replaces our custom TestMain replace code with the standard code for running tests (generated by `go list`). * It adds a dummy runtime/pprof package and modifies the testing package, to get tests to run again with the code generated by `go list`.