Skip to content

Commit

Permalink
Work around rust-lang/rust#61440
Browse files Browse the repository at this point in the history
  • Loading branch information
infinity0 committed Jul 20, 2019
1 parent 9f7bd62 commit b64db39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/testsuite/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ fn specify_rustflags() {
[FINISHED] [..]
";
p.cargo("fix --edition --allow-no-vcs")
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr(stderr)
.with_stdout("")
.run();
Expand Down
16 changes: 8 additions & 8 deletions tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ fn changing_rustflags_is_cached() {

p.cargo("build").run();
p.cargo("build")
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr(
"\
[COMPILING] foo v0.0.1 ([..])
Expand All @@ -1165,7 +1165,7 @@ fn changing_rustflags_is_cached() {
.with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
.run();
p.cargo("build")
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
.run();
}
Expand All @@ -1191,7 +1191,7 @@ fn update_dependency_mtime_does_not_rebuild() {

p.cargo("build -Z mtime-on-use")
.masquerade_as_nightly_cargo()
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr(
"\
[COMPILING] bar v0.0.1 ([..])
Expand All @@ -1202,13 +1202,13 @@ fn update_dependency_mtime_does_not_rebuild() {
// This does not make new files, but it does update the mtime of the dependency.
p.cargo("build -p bar -Z mtime-on-use")
.masquerade_as_nightly_cargo()
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
.run();
// This should not recompile!
p.cargo("build -Z mtime-on-use")
.masquerade_as_nightly_cargo()
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
.run();
}
Expand Down Expand Up @@ -1269,7 +1269,7 @@ fn fingerprint_cleaner_does_not_rebuild() {
.run();
p.cargo("build -Z mtime-on-use")
.masquerade_as_nightly_cargo()
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr(
"\
[COMPILING] bar v0.0.1 ([..])
Expand All @@ -1287,14 +1287,14 @@ fn fingerprint_cleaner_does_not_rebuild() {
// This does not make new files, but it does update the mtime.
p.cargo("build -Z mtime-on-use")
.masquerade_as_nightly_cargo()
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
.run();
fingerprint_cleaner(p.target_debug_dir(), timestamp);
// This should not recompile!
p.cargo("build -Z mtime-on-use")
.masquerade_as_nightly_cargo()
.env("RUSTFLAGS", "-C target-cpu=native")
.env("RUSTFLAGS", "-C linker=cc")
.with_stderr("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]")
.run();
// But this should be cleaned and so need a rebuild
Expand Down

0 comments on commit b64db39

Please sign in to comment.