mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-19 19:42:19 +02:00
Re-apply "android: Don't strip debug info out of the AAR"
A revised version of the earlier 23192280
:
- Uses --build-id for all archs, not just aarch64
- Also raises Gradle's memory limits
This commit is contained in:
parent
85e0de9207
commit
9d729ff083
@ -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 {
|
||||
|
@ -1,4 +1,5 @@
|
||||
android.enableAdditionalTestOutput=true
|
||||
android.useAndroidX=true
|
||||
# Don't rely on the HTML output; that's not useful in CI.
|
||||
org.gradle.dependency.verification.console=verbose
|
||||
org.gradle.dependency.verification.console=verbose
|
||||
org.gradle.jvmargs=-Xmx4g -Xms256m -XX:MaxMetaspaceSize=1g
|
@ -6,12 +6,15 @@
|
||||
use std::env;
|
||||
|
||||
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"
|
||||
{
|
||||
// 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.
|
||||
println!("cargo:rustc-cdylib-link-arg=-Wl,--no-as-needed,-ldl,--as-needed");
|
||||
if 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");
|
||||
|
||||
if env::var("CARGO_CFG_TARGET_ARCH").expect("set by Cargo") == "aarch64" {
|
||||
// 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.
|
||||
println!("cargo:rustc-cdylib-link-arg=-Wl,--no-as-needed,-ldl,--as-needed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user