We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ce02f3 commit 4da42c3Copy full SHA for 4da42c3
build.rs
@@ -489,6 +489,16 @@ mod c {
489
sources.remove(&["__aeabi_cdcmp", "__aeabi_cfcmp"]);
490
}
491
492
+ // Android uses emulated TLS so we need a runtime support function.
493
+ if target_os == "android" {
494
+ sources.extend(&[("__emutls_get_address", "emutls.c")]);
495
+
496
+ // Work around a bug in the NDK headers (fixed in
497
+ // https://r.android.com/2038949 which will be released in a future
498
+ // NDK version) by providing a definition of LONG_BIT.
499
+ cfg.define("LONG_BIT", "(8 * sizeof(long))");
500
+ }
501
502
// When compiling the C code we require the user to tell us where the
503
// source code is, and this is largely done so when we're compiling as
504
// part of rust-lang/rust we can use the same llvm-project repository as
0 commit comments