Commit 446ad8e3 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

unix: require GOOS be set in mksyscall

If you don't set GOOS and you try to regenerate
the darwin files, it appears to succeed.
However, because libc was not selected,
it generates broken code.

Change-Id: I20fb4f51dcc539a03b6c6ed03ce39b78d5987d41
Reviewed-on: https://go-review.googlesource.com/c/161719
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 41f3e658
......@@ -88,6 +88,10 @@ func parseParam(p string) Param {
func main() {
// Get the OS and architecture (using GOARCH_TARGET if it exists)
goos := os.Getenv("GOOS")
if goos == "" {
fmt.Fprintln(os.Stderr, "GOOS not defined in environment")
os.Exit(1)
}
goarch := os.Getenv("GOARCH_TARGET")
if goarch == "" {
goarch = os.Getenv("GOARCH")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment