cmd/ebitenmobile: Bug fix: -ldflags did not work correctly

Fixes #1139
This commit is contained in:
Hajime Hoshi 2020-04-23 00:18:53 +09:00
parent 9c1b99bd26
commit 56ae207d2a

View File

@ -111,10 +111,12 @@ func main() {
// Add ldflags to suppress linker errors (#932).
// See https://github.com/golang/go/issues/17807
if buildLdflags == "" {
buildLdflags += " "
if buildTarget == "android" {
if buildLdflags != "" {
buildLdflags += " "
}
buildLdflags += "-extldflags=-Wl,-soname,libgojni.so"
}
buildLdflags += "-extldflags=-Wl,-soname,libgojni.so"
if err := prepareGomobileCommands(); err != nil {
log.Fatal(err)