diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-01-22 12:53:35 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-01-26 23:47:39 -0800 |
| commit | a5561ce2b94c33add47d288e1826183c511ec9fa (patch) | |
| tree | 14e4e5f4daabb28b66b7c4a58d7f08e930d2a3b7 /src/liballoc_jemalloc/build.rs | |
| parent | 025fb7de09dfcf5fbc19c5d1b6bed168ac987e6c (diff) | |
| download | rust-a5561ce2b94c33add47d288e1826183c511ec9fa.tar.gz rust-a5561ce2b94c33add47d288e1826183c511ec9fa.zip | |
rustc: Don't export builtins/panic/alloc syms
This hides symbols from various unstable and implementation-detail crates of the standard library. Although typically transitive exported `pub extern` functions are exported from cdylibs, these crates aren't necessary as they're all implementation details. Closes #34493
Diffstat (limited to 'src/liballoc_jemalloc/build.rs')
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index 1edcb0b1f24..1143df0c630 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -181,4 +181,15 @@ fn main() { } else if !target.contains("windows") && !target.contains("musl") { println!("cargo:rustc-link-lib=pthread"); } + + // The pthread_atfork symbols is used by jemalloc on android but the really + // old android we're building on doesn't have them defined, so just make + // sure the symbols are available. + if target.contains("androideabi") { + println!("cargo:rerun-if-changed=pthread_atfork_dummy.c"); + gcc::Config::new() + .flag("-fvisibility=hidden") + .file("pthread_atfork_dummy.c") + .compile("libpthread_atfork_dummy.a"); + } } |
