From b64db390c41462ffd58663be801a52658b63a468 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sat, 20 Jul 2019 15:58:37 -0700 Subject: [PATCH] Work around rust-lang/rust#61440 --- tests/testsuite/fix.rs | 2 +- tests/testsuite/freshness.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index e21b7df0a76..225362ac10f 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -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(); diff --git a/tests/testsuite/freshness.rs b/tests/testsuite/freshness.rs index e87cc895e30..e103da47b77 100644 --- a/tests/testsuite/freshness.rs +++ b/tests/testsuite/freshness.rs @@ -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 ([..]) @@ -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(); } @@ -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 ([..]) @@ -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(); } @@ -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 ([..]) @@ -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