Skip to content

Commit

Permalink
Rollup merge of #137957 - Noratrieb:no, r=wesleywiser
Browse files Browse the repository at this point in the history
Remove i586-pc-windows-msvc

See [MCP 840](rust-lang/compiler-team#840).

I left a specialized error message that should help users that hit this in the wild (for example, because they use it in their CI).

```
error: Error loading target specification: the `i586-pc-windows-msvc` target has been removed. Use the `i686-pc-windows-msvc` target instead.
       Windows 10 (the minimum required OS version) requires a CPU baseline of at least i686 so you can safely switch. Run `rustc --print target-list` for a list of built-in targets
```

``@workingjubilee`` ``@calebzulawski`` fyi portable-simd uses this target in CI, if you wanna remove it already before this happens
  • Loading branch information
jhpratt authored Mar 8, 2025
2 parents 4ec8407 + b5562c0 commit 8cac259
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 22 deletions.
11 changes: 9 additions & 2 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,6 @@ supported_targets! {
("i686-pc-windows-msvc", i686_pc_windows_msvc),
("i686-uwp-windows-msvc", i686_uwp_windows_msvc),
("i686-win7-windows-msvc", i686_win7_windows_msvc),
("i586-pc-windows-msvc", i586_pc_windows_msvc),
("thumbv7a-pc-windows-msvc", thumbv7a_pc_windows_msvc),
("thumbv7a-uwp-windows-msvc", thumbv7a_uwp_windows_msvc),

Expand Down Expand Up @@ -3503,7 +3502,15 @@ impl Target {
return load_file(&p);
}

Err(format!("Could not find specification for target {target_tuple:?}"))
// Leave in a specialized error message for the removed target.
// FIXME: If you see this and it's been a few months after this has been released,
// you can probably remove it.
if target_tuple == "i586-pc-windows-msvc" {
Err("the `i586-pc-windows-msvc` target has been removed. Use the `i686-pc-windows-msvc` target instead.\n\
Windows 10 (the minimum required OS version) requires a CPU baseline of at least i686 so you can safely switch".into())
} else {
Err(format!("Could not find specification for target {target_tuple:?}"))
}
}
TargetTuple::TargetJson { ref contents, .. } => {
let obj = serde_json::from_str(contents).map_err(|e| e.to_string())?;
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ auto:
RUST_CONFIGURE_ARGS: >-
--build=i686-pc-windows-msvc
--host=i686-pc-windows-msvc
--target=i686-pc-windows-msvc,i586-pc-windows-msvc
--target=i686-pc-windows-msvc
--enable-full-tools
--enable-profiler
SCRIPT: python x.py dist bootstrap --include-default-paths
Expand Down
1 change: 0 additions & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ target | std | notes
[`armv7a-none-eabi`](platform-support/arm-none-eabi.md) | * | Bare Armv7-A
[`armv7r-none-eabi`](platform-support/armv7r-none-eabi.md) | * | Bare Armv7-R
[`armv7r-none-eabihf`](platform-support/armv7r-none-eabi.md) | * | Bare Armv7-R, hardfloat
`i586-pc-windows-msvc` | * | 32-bit Windows (original Pentium) [^x86_32-floats-x87]
`i586-unknown-linux-gnu` | ✓ | 32-bit Linux (kernel 3.2, glibc 2.17, original Pentium) [^x86_32-floats-x87]
`i586-unknown-linux-musl` | ✓ | 32-bit Linux (musl 1.2.3, original Pentium) [^x86_32-floats-x87]
[`i686-linux-android`](platform-support/android.md) | ✓ | 32-bit x86 Android ([Pentium 4 plus various extensions](https://developer.android.com/ndk/guides/abis.html#x86)) [^x86_32-floats-return-ABI]
Expand Down
1 change: 0 additions & 1 deletion src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ static TARGETS: &[&str] = &[
"bpfeb-unknown-none",
"bpfel-unknown-none",
"i386-apple-ios",
"i586-pc-windows-msvc",
"i586-unknown-linux-gnu",
"i586-unknown-linux-musl",
"i586-unknown-redox",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
//@ add-core-stubs
//@ revisions: r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23
//@ revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r35 r36 r37 r38 r39 r40 r41 r42 r43 r44
//@ revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r36 r37 r38 r39 r40 r41 r42 r43 r44
//@ revisions: r45 r46 r47 r48 r49 r50 r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63 r64 r65
//@ revisions: r66 r67 r68 r69 r70 r71 r72 r73 r74 r75 r76 r77 r78 r79 r80 r81 r82 r83 r84 r85
//@ assembly-output: emit-asm
Expand Down Expand Up @@ -73,9 +73,6 @@
//@ [r32] needs-llvm-components: arm
//@ [r33] compile-flags: --target armv7-unknown-linux-musleabihf
//@ [r33] needs-llvm-components: arm

//@ [r35] compile-flags: --target i586-pc-windows-msvc
//@ [r35] needs-llvm-components: x86
//@ [r36] compile-flags: --target i586-unknown-linux-gnu
//@ [r36] needs-llvm-components: x86
//@ [r37] compile-flags: --target i586-unknown-linux-musl
Expand Down Expand Up @@ -195,7 +192,6 @@ pub fn foo() {
// r3: calll @__security_check_cookie
// r7: callq __security_check_cookie
// r13: bl __security_check_cookie
// r35: calll @__security_check_cookie

// cuda doesn't support stack-smash protection
// r49-NOT: __security_check_cookie
Expand Down
3 changes: 0 additions & 3 deletions tests/assembly/targets/targets-pe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
//@ revisions: bpfel_unknown_none
//@ [bpfel_unknown_none] compile-flags: --target bpfel-unknown-none
//@ [bpfel_unknown_none] needs-llvm-components: bpf
//@ revisions: i586_pc_windows_msvc
//@ [i586_pc_windows_msvc] compile-flags: --target i586-pc-windows-msvc
//@ [i586_pc_windows_msvc] needs-llvm-components: x86
//@ revisions: i686_pc_windows_gnu
//@ [i686_pc_windows_gnu] compile-flags: --target i686-pc-windows-gnu
//@ [i686_pc_windows_gnu] needs-llvm-components: x86
Expand Down

0 comments on commit 8cac259

Please sign in to comment.