)
.run();
}
+
+#[cargo_test]
+fn rustc_with_print_cfg_config_toml() {
+ let p = project()
+ .file("Cargo.toml", &basic_bin_manifest("foo"))
+ .file(".cargo/config.toml", r#"
+[target.x86_64-pc-windows-msvc]
+rustflags = ["-C", "target-feature=+crt-static"]
+"#)
+ .file("src/main.rs", r#"fn main() {} "#)
+ .build();
+
+ p.cargo("rustc -Z unstable-options --target x86_64-pc-windows-msvc --print cfg")
+ .masquerade_as_nightly_cargo()
+ .env("RUSTFLAGS", "-C target-feature=+crt-static")
+ .with_stdout_contains(
+ "\
+debug_assertions
+target_arch=\"x86_64\"
+target_endian=\"little\"
+target_env=\"msvc\"
+target_family=\"windows\"
+target_feature=\"crt-static\"
+target_feature=\"fxsr\"
+target_feature=\"sse\"
+target_feature=\"sse2\"
+target_has_atomic=\"16\"
+target_has_atomic=\"32\"
+target_has_atomic=\"64\"
+target_has_atomic=\"8\"
+target_has_atomic=\"ptr\"
+target_has_atomic_equal_alignment=\"16\"
+target_has_atomic_equal_alignment=\"32\"
+target_has_atomic_equal_alignment=\"64\"
+target_has_atomic_equal_alignment=\"8\"
+target_has_atomic_equal_alignment=\"ptr\"
+target_has_atomic_load_store=\"16\"
+target_has_atomic_load_store=\"32\"
+target_has_atomic_load_store=\"64\"
+target_has_atomic_load_store=\"8\"
+target_has_atomic_load_store=\"ptr\"
+target_os=\"windows\"
+target_pointer_width=\"64\"
+target_thread_local
+target_vendor=\"pc\"
+windows
+",
+ )
+ .run();
+}