mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
internal: allow overriding proc macro server in analysis-stats
This commit is contained in:
parent
68f3e4d636
commit
931b1c32c9
2 changed files with 12 additions and 3 deletions
|
@ -81,7 +81,13 @@ impl flags::AnalysisStats {
|
||||||
with_proc_macro_server: if self.disable_proc_macros {
|
with_proc_macro_server: if self.disable_proc_macros {
|
||||||
ProcMacroServerChoice::None
|
ProcMacroServerChoice::None
|
||||||
} else {
|
} else {
|
||||||
ProcMacroServerChoice::Sysroot
|
match self.proc_macro_srv {
|
||||||
|
Some(ref path) => {
|
||||||
|
let path = vfs::AbsPathBuf::assert_utf8(path.to_owned());
|
||||||
|
ProcMacroServerChoice::Explicit(path)
|
||||||
|
}
|
||||||
|
None => ProcMacroServerChoice::Sysroot,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
prefill_caches: false,
|
prefill_caches: false,
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,6 +76,8 @@ xflags::xflags! {
|
||||||
optional --disable-build-scripts
|
optional --disable-build-scripts
|
||||||
/// Don't use expand proc macros.
|
/// Don't use expand proc macros.
|
||||||
optional --disable-proc-macros
|
optional --disable-proc-macros
|
||||||
|
/// Run the proc-macro-srv binary at the specified path.
|
||||||
|
optional --proc-macro-srv path: PathBuf
|
||||||
/// Skip body lowering.
|
/// Skip body lowering.
|
||||||
optional --skip-lowering
|
optional --skip-lowering
|
||||||
/// Skip type inference.
|
/// Skip type inference.
|
||||||
|
@ -120,7 +122,7 @@ xflags::xflags! {
|
||||||
optional --disable-build-scripts
|
optional --disable-build-scripts
|
||||||
/// Don't use expand proc macros.
|
/// Don't use expand proc macros.
|
||||||
optional --disable-proc-macros
|
optional --disable-proc-macros
|
||||||
/// Run a custom proc-macro-srv binary.
|
/// Run the proc-macro-srv binary at the specified path.
|
||||||
optional --proc-macro-srv path: PathBuf
|
optional --proc-macro-srv path: PathBuf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +135,7 @@ xflags::xflags! {
|
||||||
optional --disable-build-scripts
|
optional --disable-build-scripts
|
||||||
/// Don't use expand proc macros.
|
/// Don't use expand proc macros.
|
||||||
optional --disable-proc-macros
|
optional --disable-proc-macros
|
||||||
/// Run a custom proc-macro-srv binary.
|
/// Run the proc-macro-srv binary at the specified path.
|
||||||
optional --proc-macro-srv path: PathBuf
|
optional --proc-macro-srv path: PathBuf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,6 +235,7 @@ pub struct AnalysisStats {
|
||||||
pub no_sysroot: bool,
|
pub no_sysroot: bool,
|
||||||
pub disable_build_scripts: bool,
|
pub disable_build_scripts: bool,
|
||||||
pub disable_proc_macros: bool,
|
pub disable_proc_macros: bool,
|
||||||
|
pub proc_macro_srv: Option<PathBuf>,
|
||||||
pub skip_lowering: bool,
|
pub skip_lowering: bool,
|
||||||
pub skip_inference: bool,
|
pub skip_inference: bool,
|
||||||
pub skip_mir_stats: bool,
|
pub skip_mir_stats: bool,
|
||||||
|
|
Loading…
Reference in a new issue