File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,16 @@ mod c {
489
489
sources. remove ( & [ "__aeabi_cdcmp" , "__aeabi_cfcmp" ] ) ;
490
490
}
491
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
+
492
502
// When compiling the C code we require the user to tell us where the
493
503
// source code is, and this is largely done so when we're compiling as
494
504
// part of rust-lang/rust we can use the same llvm-project repository as
You can’t perform that action at this time.
0 commit comments