-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To be able to compile coroutines in the standard library, we must first move the package(s) to a location where we have write access and where mutations aren't visible to other modules. It's not possible to vendor standard packages under the standard `./vendor` prefix. The Go compiler complains that it locates the packages in two locations (`./vendor` and `$GOROOT`) and refuses to choose one. This PR updates our compiler to first copy standard library packages and their dependencies into a `$MODULEDIR/goroot` directory, and also organizes the directory so that it can be used as a Go root. The caller can then compile their coroutines using standard Go tooling, they just need to override the root, e.g. ``` GOROOT=$(pwd)/goroot go build ... ```
- Loading branch information
Showing
8 changed files
with
1,063 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/goroot |
Oops, something went wrong.