From 91835dd80845e5946705b18b3429f8c7618325db Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 24 Sep 2024 18:59:47 +1200 Subject: [PATCH] doc/README: android should also use `-ldflags "-s -w"` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20ef537d..feff70bd 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Miqt supports compiling for Android. Some extra steps are required to bridge the 2. Build the necessary docker container for cross-compilation: - `docker build -t miqt/android:latest -f android-armv8a-go1.23-qt5.15-dynamic.Dockerfile .` 3. Build your application as `.so` format: - - `docker run --rm -v $(pwd):/src -w /src miqt/android:latest go build -buildmode c-shared -ldflags "-extldflags -Wl,-soname,my_go_app.so" -o android-build/libs/arm64-v8a/my_go_app.so` + - `docker run --rm -v $(pwd):/src -w /src miqt/android:latest go build -buildmode c-shared -ldflags "-s -w -extldflags -Wl,-soname,my_go_app.so" -o android-build/libs/arm64-v8a/my_go_app.so` 4. Build the Qt linking stub: - `docker run --rm -v $(pwd):/src -w /src miqt/android:latest android-stub-gen.sh my_go_app.so AndroidMain android-build/libs/arm64-v8a/libRealAppName_arm64-v8a.so` - The linking stub is needed because Qt for Android will itself only call a function named `main`, but `c-shared` can't create one.