#[derive(Clone, PartialEq, Hash)]
pub enum CrossLangLto {
LinkerPlugin(PathBuf),
+ LinkerPluginAuto,
NoLink,
Disabled
}
pub fn embed_bitcode(&self) -> bool {
match *self {
CrossLangLto::LinkerPlugin(_) |
+ CrossLangLto::LinkerPluginAuto |
CrossLangLto::NoLink => true,
CrossLangLto::Disabled => false,
}
Input::Str { .. } => "rust_out".to_string(),
}
}
+
+ pub fn get_input(&mut self) -> Option<&mut String> {
+ match *self {
+ Input::File(_) => None,
+ Input::Str { ref mut input, .. } => Some(input),
+ }
+ }
}
#[derive(Clone)]
let mut bool_arg = None;
if parse_opt_bool(&mut bool_arg, v) {
*slot = if bool_arg.unwrap() {
- CrossLangLto::NoLink
+ CrossLangLto::LinkerPluginAuto
} else {
CrossLangLto::Disabled
};
);
}
+ if debugging_opts.profile && incremental.is_some() {
+ early_error(
+ error_format,
+ "can't instrument with gcov profiling when compiling incrementally",
+ );
+ }
+
let mut prints = Vec::<PrintRequest>::new();
if cg.target_cpu.as_ref().map_or(false, |s| s == "help") {
prints.push(PrintRequest::TargetCPUs);