diff --git a/cmd/ebitenmobile/main.go b/cmd/ebitenmobile/main.go index e857461f2..f860e104b 100644 --- a/cmd/ebitenmobile/main.go +++ b/cmd/ebitenmobile/main.go @@ -109,6 +109,13 @@ func main() { flagset.Parse(args[1:]) + // Add ldflags to suppress linker errors (#932). + // See https://github.com/golang/go/issues/17807 + if buildLdflags == "" { + buildLdflags += " " + } + buildLdflags += "-extldflags=-Wl,-soname,libgojni.so" + if err := prepareGomobileCommands(); err != nil { log.Fatal(err) }