tool/gocross: add command to print the wrapper shell script

So that when importing and using gocross from other repos, there's
an easy way to get at the right wrapper script that's in sync with
the gocross binary.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2023-02-22 12:46:07 -08:00 committed by Dave Anderson
parent 860734aed9
commit 499d82af8a

View File

@ -56,6 +56,9 @@ func main() {
}
fmt.Println(filepath.Join(toolchain, "bin/go"))
os.Exit(0)
case "gocross-print-wrapper-script":
fmt.Println(wrapperScript)
os.Exit(0)
}
}
@ -94,6 +97,9 @@ func main() {
doExec(filepath.Join(toolchain, "bin/go"), args, os.Environ())
}
//go:embed gocross-wrapper.sh
var wrapperScript string
func debug(format string, args ...interface{}) {
debug := os.Getenv("GOCROSS_DEBUG")
var (