We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 040f0d1 commit fb47df7Copy full SHA for fb47df7
tests/testsuite/rustflags.rs
@@ -1435,3 +1435,21 @@ fn remap_path_prefix_works() {
1435
.with_stdout("/foo/home/.cargo/registry/src/[..]/bar-0.1.0/src/lib.rs")
1436
.run();
1437
}
1438
+
1439
+#[cargo_test]
1440
+fn host_config_rustflags_with_target() {
1441
+ // regression test for https://github.com/rust-lang/cargo/issues/10206
1442
+ let p = project()
1443
+ .file("src/lib.rs", "")
1444
+ .file("build.rs.rs", "fn main() { assert!(cfg!(foo)); }")
1445
+ .build();
1446
1447
+ p.cargo("build")
1448
+ .masquerade_as_nightly_cargo()
1449
+ .arg("-Zhost-config")
1450
+ .arg("-Ztarget-applies-to-host=no")
1451
+ .arg("-Zunstable-options")
1452
+ .arg("--config")
1453
+ .arg("host.rustflags=[\"--cfg=foo\"]")
1454
+ .run();
1455
+}
0 commit comments