use crate::config::*;
-use crate::lint;
-use crate::utils::NativeLibraryKind;
use crate::early_error;
+use crate::lint;
use crate::search_paths::SearchPath;
+use crate::utils::NativeLibraryKind;
-use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelroLevel};
use rustc_target::spec::TargetTriple;
+use rustc_target::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, RelroLevel};
-use syntax_pos::edition::Edition;
use rustc_feature::UnstableFeatures;
+use rustc_span::edition::Edition;
use getopts;
use std::collections::BTreeMap;
-use std::str;
-use std::hash::Hasher;
use std::collections::hash_map::DefaultHasher;
+use std::hash::Hasher;
use std::path::PathBuf;
+use std::str;
macro_rules! hash_option {
- ($opt_name:ident, $opt_expr:expr, $sub_hashes:expr, [UNTRACKED]) => ({});
- ($opt_name:ident, $opt_expr:expr, $sub_hashes:expr, [TRACKED]) => ({
- if $sub_hashes.insert(stringify!($opt_name),
- $opt_expr as &dyn dep_tracking::DepTrackingHash).is_some() {
+ ($opt_name:ident, $opt_expr:expr, $sub_hashes:expr, [UNTRACKED]) => {{}};
+ ($opt_name:ident, $opt_expr:expr, $sub_hashes:expr, [TRACKED]) => {{
+ if $sub_hashes
+ .insert(stringify!($opt_name), $opt_expr as &dyn dep_tracking::DepTrackingHash)
+ .is_some()
+ {
panic!("duplicate key in CLI DepTrackingHash: {}", stringify!($opt_name))
}
- });
+ }};
}
macro_rules! top_level_options {
"choose which RELRO level to use"),
nll_facts: bool = (false, parse_bool, [UNTRACKED],
"dump facts from NLL analysis into side files"),
- nll_dont_emit_read_for_match: bool = (false, parse_bool, [UNTRACKED],
- "in match codegen, do not include FakeRead statements (used by mir-borrowck)"),
dont_buffer_diagnostics: bool = (false, parse_bool, [UNTRACKED],
"emit diagnostics rather than buffering (breaks NLL error downgrading, sorting)."),
polonius: bool = (false, parse_bool, [UNTRACKED],
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)"),
run_dsymutil: Option<bool> = (None, parse_opt_bool, [TRACKED],
"run `dsymutil` and delete intermediate object files"),
- ui_testing: bool = (false, parse_bool, [UNTRACKED],
+ ui_testing: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
"format compiler diagnostics in a way that's better suitable for UI testing"),
embed_bitcode: bool = (false, parse_bool, [TRACKED],
"embed LLVM bitcode in object files"),
insert_sideeffect: bool = (false, parse_bool, [TRACKED],
"fix undefined behavior when a thread doesn't eventually make progress \
(such as entering an empty infinite loop) by inserting llvm.sideeffect"),
+ deduplicate_diagnostics: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
+ "deduplicate identical diagnostics"),
}