Skip to content

Commit eecef27

Browse files
committed
feat(xtask): expect CARGO_ENCODED_RUSTFLAGS to be empty
1 parent 1caea89 commit eecef27

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

xtask/src/build.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,11 @@ impl Build {
8686
}
8787

8888
fn cargo_encoded_rustflags(&self) -> Result<String> {
89-
let outer_rustflags = match env::var("CARGO_ENCODED_RUSTFLAGS") {
90-
Ok(s) => Some(s),
91-
Err(VarError::NotPresent) => None,
92-
Err(err) => return Err(err.into()),
93-
};
94-
let mut rustflags = outer_rustflags
95-
.as_deref()
96-
.map(|s| vec![s])
97-
.unwrap_or_default();
89+
assert_eq!(
90+
env::var("CARGO_ENCODED_RUSTFLAGS"),
91+
Err(VarError::NotPresent)
92+
);
93+
let mut rustflags = Vec::new();
9894

9995
if self.instrument_mcount {
10096
rustflags.push("-Zinstrument-mcount");

0 commit comments

Comments
 (0)