1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-29 16:03:11 +02:00

Link statically to avoid dynamic link error (#1544)

```
$ adb shell /data/local/tmp/hello_rust_with_dep
CANNOT LINK EXECUTABLE "/data/local/tmp/hello_rust_with_dep": library "libtextwrap.dylib.so" not found: needed by main executable
```
This commit is contained in:
Ning Chen 2023-12-21 05:27:14 -08:00 committed by GitHub
parent a9eaa129cf
commit 01b4b28ff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,7 @@ rust_binary {
"libbinder_rs",
"libbirthdayservice",
],
prefer_rlib: true, // To avoid dynamic link error.
}
// ANCHOR_END: birthday_server
@ -32,5 +33,6 @@ rust_binary {
"com.example.birthdayservice-rust",
"libbinder_rs",
],
prefer_rlib: true, // To avoid dynamic link error.
}
// ANCHOR_END: birthday_client

View File

@ -6,6 +6,7 @@ rust_binary {
"libgreetings",
"libtextwrap",
],
prefer_rlib: true, // Need this to avoid dynamic link error.
}
rust_library {