Skip to content

Commit

Permalink
re-add opt-level
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed May 17, 2024
1 parent b391527 commit 1a6a3ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/tools/run-make-support/src/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ impl Rustc {
self
}

/// Specify a specific optimization level.
pub fn opt_level(&mut self, option: &str) -> &mut Self {
self.cmd.arg(format!("-Copt-level={option}"));
self
}

/// Specify type(s) of output files to generate.
pub fn emit(&mut self, kinds: &str) -> &mut Self {
self.cmd.arg(format!("--emit={kinds}"));
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/no-mark-noalias/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
use run_make_support::{run, rustc};

fn main() {
rustc().input("main.rs").opt-level("1").run();
rustc().input("main.rs").opt_level("1").run();
run("main");
}

0 comments on commit 1a6a3ec

Please sign in to comment.