From 3d6f263b2a162974725cdcb914ba9ad9c2dbef84 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 22 Jan 2017 12:58:56 -0800 Subject: std: Compile libbacktrace with -fvisibility=hidden We don't want these symbols exported from the standard library, this is just an internal implementation detail of the standard library currently. Closes #34984 --- src/libstd/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/build.rs b/src/libstd/build.rs index 5e1c3a28515..9504194393f 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -87,8 +87,9 @@ fn build_libbacktrace(host: &str, target: &str) { let compiler = gcc::Config::new().get_compiler(); // only msvc returns None for ar so unwrap is okay let ar = build_helper::cc2ar(compiler.path(), target).unwrap(); - let cflags = compiler.args().iter().map(|s| s.to_str().unwrap()) - .collect::>().join(" "); + let mut cflags = compiler.args().iter().map(|s| s.to_str().unwrap()) + .collect::>().join(" "); + cflags.push_str(" -fvisibility=hidden"); run(Command::new("sh") .current_dir(&build_dir) .arg(src_dir.join("configure").to_str().unwrap() -- cgit 1.4.1-3-g733a5