diff options
| author | Rich Kadel <richkadel@google.com> | 2020-09-16 10:47:56 -0700 |
|---|---|---|
| committer | Rich Kadel <richkadel@google.com> | 2020-09-16 11:27:17 -0700 |
| commit | 3875abe32f6b98449bf2ec99ed210b7b77953703 (patch) | |
| tree | 6d204857cb2bdf489d0577a8547e0d5d812221b3 | |
| parent | 5c29332ace48d8c34ad415ffcdce2641526938b8 (diff) | |
| download | rust-3875abe32f6b98449bf2ec99ed210b7b77953703.tar.gz rust-3875abe32f6b98449bf2ec99ed210b7b77953703.zip | |
Added RUSTC_GRAPHVIZ_FONT environment variable
Overrides the debugging_opts.graphviz_font setting.
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 19cd2385992..b0d39b95313 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 60bd557b880..4d35ec2e5d9 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -910,7 +910,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, 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 (default: `Courier, monospace`)"), + "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], |
