about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2020-05-05 12:41:23 -0700
committerPetr Hosek <phosek@google.com>2020-05-05 12:41:23 -0700
commit32d1a4b025716727bb9b350fcbddaad16ee1ab17 (patch)
treee2bf182e9fd085334ca39a307fe8673423725794
parentf8d394e5184fe3af761ea1e5ba73f993cfb36dfe (diff)
downloadrust-32d1a4b025716727bb9b350fcbddaad16ee1ab17.tar.gz
rust-32d1a4b025716727bb9b350fcbddaad16ee1ab17.zip
Use -fvisibility=hidden for libunwind
We don't want to export any symbols from Rust's version of libunwind
as these may collide with other copies of libunwind e.g. when linking
Rust staticlib together C/C++ libraries that have their own version.
-rw-r--r--src/libunwind/build.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
index c8d2419ab45..1462639259c 100644
--- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs
@@ -89,6 +89,7 @@ mod llvm_libunwind {
             cfg.flag("-fno-rtti");
             cfg.flag("-fstrict-aliasing");
             cfg.flag("-funwind-tables");
+            cfg.flag("-fvisibility=hidden");
         }
 
         let mut unwind_sources = vec![