
iOS does not have any TLS, so we don't need to keep track of it. This allows compiling for the aarch64-apple-ios target.
13 lines
300 B
Rust
13 lines
300 B
Rust
// build.rs
|
|
|
|
fn main() {
|
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
|
if target_os != "ios" {
|
|
cc::Build::new().file("src/gettls.c").compile("libgettls.a");
|
|
}
|
|
|
|
// Force linking against libc++
|
|
#[cfg(unix)]
|
|
println!("cargo:rustc-link-lib=dylib=c++");
|
|
}
|