Skip to content

Commit

Permalink
Enable linker build-id for android builds. (netty#745)
Browse files Browse the repository at this point in the history
Motivation:

Linker `build-id` is
[mandatory](https://firebase.google.com/docs/crashlytics/ndk-reports) to
make Firebase crashlytics recognise libraries which encounters crashes.
So since Firebase is ubiquitous to monitor app crash performance it make
sense to enable it for android builds. It only slightly increases binary
size (20 bytes) but make Firebase crash symbolication work. Here I
assume that debugging symbols are currently presented/published, if not
the case it will be handled in subsequent PRs.

Modifications:

Add build flags

Result:
build-id is now present
  • Loading branch information
mstyura authored Sep 10, 2024
1 parent d60c719 commit ea7f8e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec-native-quic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
<ldflags>-L${quicheHomeBuildDir} -lquiche -L${boringsslHomeBuildDir} -lssl -lcrypto</ldflags>
<bundleNativeCode>META-INF/native/${jniLibName}.dll;osname=android;processor=${androidAbi}</bundleNativeCode>
<ndkToolchain>${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64</ndkToolchain>
<extraLdflags>-Wl,-soname=${jniLibName}.so -Wl,--strip-debug -Wl,--exclude-libs,ALL -lm</extraLdflags>
<extraLdflags>-Wl,-soname=${jniLibName}.so -Wl,--build-id=sha1 -Wl,--strip-debug -Wl,--exclude-libs,ALL -lm</extraLdflags>

<extraConfigureArg>--host=${androidTriple}</extraConfigureArg>

Expand Down

0 comments on commit ea7f8e3

Please sign in to comment.