1
Fork 0

run-make-support: add -Csymbol-mangling-version and -Cprefer-dynamic helpers to rustc

Co-authored-by: binarycat <binarycat@envs.net>
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-20 19:10:15 +08:00 committed by Jieyou Xu
parent 6c1d960d88
commit 09f68486bd

View file

@ -216,6 +216,18 @@ impl Rustc {
self
}
/// Specify option of `-C symbol-mangling-version`.
pub fn symbol_mangling_version(&mut self, option: &str) -> &mut Self {
self.cmd.arg(format!("-Csymbol-mangling-version={option}"));
self
}
/// Specify `-C prefer-dynamic`.
pub fn prefer_dynamic(&mut self) -> &mut Self {
self.cmd.arg(format!("-Cprefer-dynamic"));
self
}
/// Specify error format to use
pub fn error_format(&mut self, format: &str) -> &mut Self {
self.cmd.arg(format!("--error-format={format}"));