Skip to content

Commit dd12b10

Browse files
committed
fixup: add target feature flag
1 parent b648598 commit dd12b10

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/cargo-codspeed/tests/cargo_config.in/.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
[build]
44
rustflags = ["--cfg", "this_does_nothing"]
55

6+
[target.x86_64-unknown-linux-gnu]
7+
rustflags = ["--cfg", "target_feature_flag"]
8+
69
[target.'cfg(all())']
710
rustflags = ["--cfg", "custom_feature_flag"]

crates/cargo-codspeed/tests/cargo_config.in/benches/cargo_config_bench.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ fn bench_failing_without_custom_flag(c: &mut Criterion) {
88
compile_error!(
99
"custom_feature_flag is not enabled - .cargo/config.toml rustflags not applied"
1010
);
11+
12+
#[cfg(not(target_feature_flag))]
13+
compile_error!(
14+
"target_feature_flag is not enabled - .cargo/config.toml rustflags not applied"
15+
);
1116
})
1217
});
1318
}

0 commit comments

Comments
 (0)