From 32d1a4b025716727bb9b350fcbddaad16ee1ab17 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 5 May 2020 12:41:23 -0700 Subject: [PATCH] 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. --- src/libunwind/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs index c8d2419ab4514..1462639259cb8 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![