run-make-support: add some stable rustc flag helpers

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-16 14:18:44 +08:00
parent 68b6f92a56
commit 1e87d00e11

View File

@ -338,6 +338,18 @@ impl Rustc {
self
}
/// Specify `-C debuginfo=...`.
pub fn debuginfo(&mut self, level: &str) -> &mut Self {
self.cmd.arg(format!("-Cdebuginfo={level}"));
self
}
/// Specify `-C split-debuginfo={packed,unpacked,off}`.
pub fn split_debuginfo(&mut self, split_kind: &str) -> &mut Self {
self.cmd.arg(format!("-Csplit-debuginfo={split_kind}"));
self
}
/// Pass the `--verbose` flag.
pub fn verbose(&mut self) -> &mut Self {
self.cmd.arg("--verbose");