about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-16 20:18:19 +0000
committerbors <bors@rust-lang.org>2020-09-16 20:18:19 +0000
commit285fc7d704fcdd7b2a37d475d04d5d955490e000 (patch)
tree4f1ec58da1fa3129a2003b6dd61763381221b1c5 /compiler/rustc_session/src
parentff806b87167a9b4f38b9e3d2f6e9c4e621df6a77 (diff)
parent3bf66ae25f6f84d22e39ac05b4f3623b08132805 (diff)
downloadrust-285fc7d704fcdd7b2a37d475d04d5d955490e000.tar.gz
rust-285fc7d704fcdd7b2a37d475d04d5d955490e000.zip
Auto merge of #76804 - tmandry:rollup-nwntt3q, r=tmandry
Rollup of 16 pull requests

Successful merges:

 - #75026 (Add array_windows fn)
 - #76642 (Do not lint ignored private doc tests)
 - #76719 (Change error message for ty param in const)
 - #76721 (Use intra-doc links in `core::mem`)
 - #76728 (Add a comment why `extern crate` is necessary for rustdoc)
 - #76735 (Remove unnecessary `clone()`s in bootstrap)
 - #76741 (Avoid printing dry run timings)
 - #76747 (Add missing code examples in libcore)
 - #76756 (fix a couple of stylistic clippy warnings)
 - #76758 ([fuchsia] Propagate the userspace UTC clock)
 - #76759 (Fix stabilization marker for future_readiness_fns)
 - #76760 (don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations))
 - #76764 (Update books)
 - #76775 (Strip a single leading tab when rendering dataflow diffs)
 - #76778 (Simplify iter fuse struct doc)
 - #76794 (Make graphviz font configurable)

Failed merges:

r? `@ghost`
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/config.rs4
-rw-r--r--compiler/rustc_session/src/options.rs3
2 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 4aecb35294a..3f12596a236 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1762,6 +1762,10 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
         debugging_opts.symbol_mangling_version = SymbolManglingVersion::V0;
     }
 
+    if let Ok(graphviz_font) = std::env::var("RUSTC_GRAPHVIZ_FONT") {
+        debugging_opts.graphviz_font = graphviz_font;
+    }
+
     if !cg.embed_bitcode {
         match cg.lto {
             LtoCli::No | LtoCli::Unspecified => {}
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index c5050dbea73..8cc55f4ebe8 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -911,6 +911,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "set the optimization fuel quota for a crate"),
     graphviz_dark_mode: bool = (false, parse_bool, [UNTRACKED],
         "use dark-themed colors in graphviz output (default: no)"),
+    graphviz_font: String = ("Courier, monospace".to_string(), parse_string, [UNTRACKED],
+        "use the given `fontname` in graphviz output; can be overridden by setting \
+        environment variable `RUSTC_GRAPHVIZ_FONT` (default: `Courier, monospace`)"),
     hir_stats: bool = (false, parse_bool, [UNTRACKED],
         "print some statistics about AST and HIR (default: no)"),
     human_readable_cgu_names: bool = (false, parse_bool, [TRACKED],