Skip to content

Commit 1a6a3ec

Browse files
committed
re-add opt-level
1 parent b391527 commit 1a6a3ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/tools/run-make-support/src/rustc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ impl Rustc {
6464
self
6565
}
6666

67+
/// Specify a specific optimization level.
68+
pub fn opt_level(&mut self, option: &str) -> &mut Self {
69+
self.cmd.arg(format!("-Copt-level={option}"));
70+
self
71+
}
72+
6773
/// Specify type(s) of output files to generate.
6874
pub fn emit(&mut self, kinds: &str) -> &mut Self {
6975
self.cmd.arg(format!("--emit={kinds}"));

tests/run-make/no-mark-noalias/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
use run_make_support::{run, rustc};
1010

1111
fn main() {
12-
rustc().input("main.rs").opt-level("1").run();
12+
rustc().input("main.rs").opt_level("1").run();
1313
run("main");
1414
}

0 commit comments

Comments
 (0)