mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 12:03:41 +00:00
goenv: support GOOS=android
TinyGo doesn't currently support Android directly. However, GOOS=linux works fine on Android. Therefore, force GOOS=linux on Android.
This commit is contained in:
committed by
Ron Evans
parent
e70dfa4dd6
commit
a0407be7b7
+7
-3
@@ -42,10 +42,14 @@ var TINYGOROOT string
|
||||
func Get(name string) string {
|
||||
switch name {
|
||||
case "GOOS":
|
||||
if dir := os.Getenv("GOOS"); dir != "" {
|
||||
return dir
|
||||
goos := os.Getenv("GOOS")
|
||||
if goos == "" {
|
||||
goos = runtime.GOOS
|
||||
}
|
||||
return runtime.GOOS
|
||||
if goos == "android" {
|
||||
goos = "linux"
|
||||
}
|
||||
return goos
|
||||
case "GOARCH":
|
||||
if dir := os.Getenv("GOARCH"); dir != "" {
|
||||
return dir
|
||||
|
||||
Reference in New Issue
Block a user