Skip to content

Commit 38d1803

Browse files
authored
Merge pull request #630 from immunant/kkysen/instrument-allow-warnings: Allow warnings by default in instrumentation
By default, set `RUSTFLAGS="-A warnings"` since transpiled code usually has a ton of warnings. Note that this can be easily reversed by a subsequent `--rustflags="-D warnings"`.
2 parents 54a3b37 + 6dfd5be commit 38d1803

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dynamic_instrumentation/src/main.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,14 @@ fn cargo_wrapper(rustc_wrapper: &Path) -> anyhow::Result<()> {
525525
Cow::Borrowed(metadata_path)
526526
};
527527

528-
let rustflags = [env::var_os("RUSTFLAGS"), rustflags]
529-
.into_iter()
530-
.flatten()
531-
.join(OsStr::new(" "));
528+
let rustflags = [
529+
env::var_os("RUSTFLAGS"),
530+
Some("-A warnings".into()),
531+
rustflags,
532+
]
533+
.into_iter()
534+
.flatten()
535+
.join(OsStr::new(" "));
532536

533537
// Enable the runtime dependency.
534538
add_feature(&mut cargo_args, &["c2rust-analysis-rt"]);

0 commit comments

Comments
 (0)