about summary refs log tree commit diff
path: root/compiler/rustc_target/src/spec
diff options
context:
space:
mode:
authorLukasz Anforowicz <lukasza@chromium.org>2023-12-13 21:14:18 +0000
committerLukasz Anforowicz <lukasza@chromium.org>2023-12-13 21:14:23 +0000
commit981c4e3ce6f3d89f681fbb0de753d03425c6a209 (patch)
tree45fac0a87e9435e05ef8b63941ba36ed650f885d /compiler/rustc_target/src/spec
parent56d25ba5ea3515ba2b361b6c4636373734eb27cc (diff)
downloadrust-981c4e3ce6f3d89f681fbb0de753d03425c6a209.tar.gz
rust-981c4e3ce6f3d89f681fbb0de753d03425c6a209.zip
Add unstable `-Zdefault-hidden-visibility` cmdline flag for `rustc`.
The new flag has been described in the Major Change Proposal at
https://github.com/rust-lang/compiler-team/issues/656
Diffstat (limited to 'compiler/rustc_target/src/spec')
-rw-r--r--compiler/rustc_target/src/spec/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 24893bda9e7..a78df69f187 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -2094,7 +2094,11 @@ pub struct TargetOptions {
     pub no_builtins: bool,
 
     /// The default visibility for symbols in this target should be "hidden"
-    /// rather than "default"
+    /// rather than "default".
+    ///
+    /// This value typically shouldn't be accessed directly, but through
+    /// the `rustc_session::Session::default_hidden_visibility` method, which
+    /// allows `rustc` users to override this setting using cmdline flags.
     pub default_hidden_visibility: bool,
 
     /// Whether a .debug_gdb_scripts section will be added to the output object file