message: Add test using RUSTFLAGS env var
  The `RUSTFLAGS` environment variable is used to add the "crt-static"
  target feature and test printing the target compiler configuration
  contains the `target_feature="crt-static"` line.
diff: @@ -573,3 +573,49 @@ windows",
  )
  .run();
  }
  +
  +#[cargo_test]
  +fn rustc_with_print_cfg_rustflags_env_var() {
  + let p = project()
  + .file("Cargo.toml", &basic_bin_manifest("foo"))
  + .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();
  +}
  