about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-04-06 18:07:53 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-06-12 23:07:12 +0200
commit185dcebbff7f3c18fb94be82f76bdfd620cfb096 (patch)
tree8a2bca66b2eef8b697146079da50f47f22387a54
parent55cee44671ecb0869cc7fbac0ad62f6236893d06 (diff)
downloadrust-185dcebbff7f3c18fb94be82f76bdfd620cfb096.tar.gz
rust-185dcebbff7f3c18fb94be82f76bdfd620cfb096.zip
Limit dylib symbols
-rw-r--r--src/librustc_codegen_ssa/back/linker.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index 260c07a7b62..eee9533535f 100644
--- a/src/librustc_codegen_ssa/back/linker.rs
+++ b/src/librustc_codegen_ssa/back/linker.rs
@@ -377,15 +377,11 @@ impl<'a> Linker for GccLinker<'a> {
             return;
         }
 
-        // If we're compiling a dylib, then we let symbol visibility in object
-        // files to take care of whether they're exported or not.
-        //
-        // If we're compiling a cdylib, however, we manually create a list of
-        // exported symbols to ensure we don't expose any more. The object files
-        // have far more public symbols than we actually want to export, so we
-        // hide them all here.
-        if crate_type == CrateType::Dylib ||
-           crate_type == CrateType::ProcMacro {
+        // We manually create a list of exported symbols to ensure we don't expose any more.
+        // The object files have far more public symbols than we actually want to export,
+        // so we hide them all here.
+
+        if crate_type == CrateType::ProcMacro {
             return
         }