-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc: Add an i586-pc-windows-msvc target #32034
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson |
On the off-chance someone actually tries to create binaries with this target or even bootstrap rustc (and not just I have no idea about msvc's default codegen on 32-bit but it's probably not i586. |
pub fn target() -> Target { | ||
let mut base = super::i686_pc_windows_msvc::target(); | ||
base.options.cpu = "pentium".to_string(); | ||
base.llvm_target = "i586-pc-windows-mscv".to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be i586-pc-windows-msvc instead of -mscv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, indeed!
VS2012+ defaults to SSE2 codegen, so it would be a good idea to force that off. |
6a2dc50
to
4768c47
Compare
Appears I misread the docs and SSE2 is indeed enabled by default. |
Similarly to rust-lang#31629 where an i586-unknown-linux-gnu target was added, there is sometimes a desire to compile for x86 Windows as well where SSE2 is disabled. This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant for Windows as well. This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit Windows due to users having CPUs that don't support SSE2 instructions. It was requested that we could have non-SSE2 builds of the standard library available so they could continue to use vanilla releases and nightlies. [ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
4768c47
to
01a2a7f
Compare
FWIW it looks like we build gecko with |
Thanks for the info @rillian! We don't actually have any C code in the standard library right now for MSVC, so it's not a big worry for us, but keeps us compatible into the future if we ever add any. |
jemalloc doesn't end up in the std library binaries? |
Not for MSVC, no, we never figured out how to build it |
Ok, thanks! |
@bors: r+ |
📌 Commit 01a2a7f has been approved by |
rustc: Add an i586-pc-windows-msvc target Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is sometimes a desire to compile for x86 Windows as well where SSE2 is disabled. This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant for Windows as well. This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit Windows due to users having CPUs that don't support SSE2 instructions. It was requested that we could have non-SSE2 builds of the standard library available so they could continue to use vanilla releases and nightlies. [ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
💔 Test failed - auto-win-gnu-64-opt |
@bors: retry On Fri, Mar 11, 2016 at 12:22 AM, bors notifications@github.com wrote:
|
⚡ Previous build results for auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-linux-cross-opt, auto-linux-musl-64-opt, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-mac-ios-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-debug-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-32-opt, auto-win-msvc-64-opt... |
Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is
sometimes a desire to compile for x86 Windows as well where SSE2 is disabled.
This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant
for Windows as well.
This is motivated by a recent Gecko bug where crashes were seen on 32-bit
Windows due to users having CPUs that don't support SSE2 instructions. It was
requested that we could have non-SSE2 builds of the standard library available
so they could continue to use vanilla releases and nightlies.