mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-22 18:30:33 +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:
parent
a9eaa129cf
commit
01b4b28ff8
@ -20,6 +20,7 @@ rust_binary {
|
|||||||
"libbinder_rs",
|
"libbinder_rs",
|
||||||
"libbirthdayservice",
|
"libbirthdayservice",
|
||||||
],
|
],
|
||||||
|
prefer_rlib: true, // To avoid dynamic link error.
|
||||||
}
|
}
|
||||||
// ANCHOR_END: birthday_server
|
// ANCHOR_END: birthday_server
|
||||||
|
|
||||||
@ -32,5 +33,6 @@ rust_binary {
|
|||||||
"com.example.birthdayservice-rust",
|
"com.example.birthdayservice-rust",
|
||||||
"libbinder_rs",
|
"libbinder_rs",
|
||||||
],
|
],
|
||||||
|
prefer_rlib: true, // To avoid dynamic link error.
|
||||||
}
|
}
|
||||||
// ANCHOR_END: birthday_client
|
// ANCHOR_END: birthday_client
|
||||||
|
@ -6,6 +6,7 @@ rust_binary {
|
|||||||
"libgreetings",
|
"libgreetings",
|
||||||
"libtextwrap",
|
"libtextwrap",
|
||||||
],
|
],
|
||||||
|
prefer_rlib: true, // Need this to avoid dynamic link error.
|
||||||
}
|
}
|
||||||
|
|
||||||
rust_library {
|
rust_library {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user