Skip to content

Commit c68e159

Browse files
committed
Build emutls.c on Android.
Android uses emulated TLS so we need a runtime support function from this source file.
1 parent 0ce02f3 commit c68e159

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ mod c {
489489
sources.remove(&["__aeabi_cdcmp", "__aeabi_cfcmp"]);
490490
}
491491

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+
492497
// When compiling the C code we require the user to tell us where the
493498
// source code is, and this is largely done so when we're compiling as
494499
// part of rust-lang/rust we can use the same llvm-project repository as

0 commit comments

Comments
 (0)