Repository: go
Issue: x/mobile: build doesn't include libc++_shared.so to produced .apk and app immediately crashes upon start
Labels: NeedsInvestigation,mobile

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16 windows/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Gedis\AppData\Local\go-build
set GOENV=C:\Users\Gedis\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Gedis\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Gedis\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Gedis\workspace\gomobile\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Gedis\AppData\Local\Temp\go-build3903890372=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?

I was trying  basic gomobile example (golang.org/x/mobile/example/basic copied to my own module) by running: "gomobile install basic" and it produced basic.apk and it ran fine on a real device.

Then to the same basic example main.go file, I added only a single CGO library import: _ "github.com/inkyblackness/imgui-go/v4" to see if it compiles and works. It compiled without any errors and app installed to the real device, but when running it, it immediately crashed.
<details><summary>To see what error's this crash produced, I ran <code>adb logcat --buffer=crash</code> and heres the output:</summary><br><pre>
03-09 23:58:36.606 16313 16313 E AndroidRuntime: FATAL EXCEPTION: main
03-09 23:58:36.606 16313 16313 E AndroidRuntime: Process: org.golang.todo.network, PID: 16313
03-09 23:58:36.606 16313 16313 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at java.lang.System.loadLibrary(System.java:1669)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at org.golang.app.GoNativeActivity.load(GoNativeActivity.java:56)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at org.golang.app.GoNativeActivity.onCreate(GoNativeActivity.java:64)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7327)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7318)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7050)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
03-09 23:58:36.606 16313 16313 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
</pre></details>

It seems like libc++_shared.so library is missing. I tried to search how I can include this with gomobile or some other way, but failed.
Is it possible to add/link this library or I'm doing something wrong and culprit is somewhere else? Thanks.