mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-19 19:42:19 +02:00
android: Don't strip debug info out of the AAR
This *greatly* increases the size of the artifacts uploaded to Maven, but it looks like the libraries do correctly get stripped when the final APK is built. (This was not true in the past.) Also, make sure the built library includes a "build ID", or else the stripped version of the library will be treated as a different library, and all the line tables will go to waste.
This commit is contained in:
parent
e3045d3ca3
commit
2319228027
@ -54,6 +54,8 @@ android {
|
||||
pickFirst 'lib/*/libsignal_jni.so'
|
||||
pickFirst 'lib/*/libsignal_jni_testing.so'
|
||||
}
|
||||
// Defer stripping to the Android app project.
|
||||
doNotStrip '**/*.so'
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
@ -9,6 +9,9 @@ fn main() {
|
||||
if env::var("CARGO_CFG_TARGET_ARCH").expect("set by Cargo") == "aarch64"
|
||||
&& env::var("CARGO_CFG_TARGET_OS").expect("set by Cargo") == "android"
|
||||
{
|
||||
// --build-id ensures that Android Studio's LLDB can map stripped binaries back to their debug info
|
||||
println!("cargo:rustc-cdylib-link-arg=-Wl,--build-id");
|
||||
|
||||
// HACK: Force libdl to be linked.
|
||||
// Something about the Docker-based build results in it getting skipped;
|
||||
// if we figure out what, we can remove this.
|
||||
|
Loading…
Reference in New Issue
Block a user