From ea6a25f594573f6512394d191ed949fa71c1f1a0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 22 Sep 2019 20:58:01 +0900 Subject: [PATCH] cmd/ebitenmobile: Add linker options This change suppresses the linker error that the .so file is not found. Fixes #932 --- cmd/ebitenmobile/main.go | 7 +++++++ 1 file changed, 7 insertions(+) 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) }