@@ -1153,7 +1153,7 @@ fn changing_rustflags_is_cached() {
11531153
11541154 p. cargo ( "build" ) . run ( ) ;
11551155 p. cargo ( "build" )
1156- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1156+ . env ( "RUSTFLAGS" , "-C linker=cc " )
11571157 . with_stderr (
11581158 "\
11591159 [COMPILING] foo v0.0.1 ([..])
@@ -1165,7 +1165,7 @@ fn changing_rustflags_is_cached() {
11651165 . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
11661166 . run ( ) ;
11671167 p. cargo ( "build" )
1168- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1168+ . env ( "RUSTFLAGS" , "-C linker=cc " )
11691169 . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
11701170 . run ( ) ;
11711171}
@@ -1191,7 +1191,7 @@ fn update_dependency_mtime_does_not_rebuild() {
11911191
11921192 p. cargo ( "build -Z mtime-on-use" )
11931193 . masquerade_as_nightly_cargo ( )
1194- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1194+ . env ( "RUSTFLAGS" , "-C linker=cc " )
11951195 . with_stderr (
11961196 "\
11971197 [COMPILING] bar v0.0.1 ([..])
@@ -1202,13 +1202,13 @@ fn update_dependency_mtime_does_not_rebuild() {
12021202 // This does not make new files, but it does update the mtime of the dependency.
12031203 p. cargo ( "build -p bar -Z mtime-on-use" )
12041204 . masquerade_as_nightly_cargo ( )
1205- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1205+ . env ( "RUSTFLAGS" , "-C linker=cc " )
12061206 . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
12071207 . run ( ) ;
12081208 // This should not recompile!
12091209 p. cargo ( "build -Z mtime-on-use" )
12101210 . masquerade_as_nightly_cargo ( )
1211- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1211+ . env ( "RUSTFLAGS" , "-C linker=cc " )
12121212 . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
12131213 . run ( ) ;
12141214}
@@ -1269,7 +1269,7 @@ fn fingerprint_cleaner_does_not_rebuild() {
12691269 . run ( ) ;
12701270 p. cargo ( "build -Z mtime-on-use" )
12711271 . masquerade_as_nightly_cargo ( )
1272- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1272+ . env ( "RUSTFLAGS" , "-C linker=cc " )
12731273 . with_stderr (
12741274 "\
12751275 [COMPILING] bar v0.0.1 ([..])
@@ -1287,14 +1287,14 @@ fn fingerprint_cleaner_does_not_rebuild() {
12871287 // This does not make new files, but it does update the mtime.
12881288 p. cargo ( "build -Z mtime-on-use" )
12891289 . masquerade_as_nightly_cargo ( )
1290- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1290+ . env ( "RUSTFLAGS" , "-C linker=cc " )
12911291 . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
12921292 . run ( ) ;
12931293 fingerprint_cleaner ( p. target_debug_dir ( ) , timestamp) ;
12941294 // This should not recompile!
12951295 p. cargo ( "build -Z mtime-on-use" )
12961296 . masquerade_as_nightly_cargo ( )
1297- . env ( "RUSTFLAGS" , "-C target-cpu=native " )
1297+ . env ( "RUSTFLAGS" , "-C linker=cc " )
12981298 . with_stderr ( "[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]" )
12991299 . run ( ) ;
13001300 // But this should be cleaned and so need a rebuild
0 commit comments