Skip to content

Commit 9b6449d

Browse files
committed
Fix find NDK on macOS
1 parent 4e22ac1 commit 9b6449d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/internal/build/sdk.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"os"
55
"path/filepath"
6+
"runtime"
67
"sort"
78
"strconv"
89
"strings"
@@ -42,7 +43,7 @@ func findSDK() {
4243
os.Setenv("ANDROID_SDK_HOME", androidSDKPath)
4344
os.Setenv("ANDROID_NDK_HOME", androidNDKPath)
4445
os.Setenv("NDK", androidNDKPath)
45-
os.Setenv("PATH", os.Getenv("PATH")+":"+filepath.Join(androidNDKPath, "toolchains", "llvm", "prebuilt", "linux-x86_64", "bin"))
46+
os.Setenv("PATH", os.Getenv("PATH")+":"+filepath.Join(androidNDKPath, "toolchains", "llvm", "prebuilt", runtime.GOOS+"-x86_64", "bin"))
4647
}
4748

4849
func findNDK() bool {

0 commit comments

Comments
 (0)