Skip to content

rustc: Add an i586-pc-windows-msvc target#32034

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:old-x86-msvc
Mar 11, 2016
Merged

rustc: Add an i586-pc-windows-msvc target#32034
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:old-x86-msvc

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

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.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton

Copy link
Copy Markdown
Member Author

r? @brson

@rust-highfive rust-highfive assigned brson and unassigned aturon Mar 4, 2016
@MagaTailor

Copy link
Copy Markdown

On the off-chance someone actually tries to create binaries with this target or even bootstrap rustc (and not just libstd) I'd advise putting explicit C(XX)FLAGS in the mk file.

I have no idea about msvc's default codegen on 32-bit but it's probably not i586.

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, indeed!

@froydnj

froydnj commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

I have no idea about msvc's default codegen on 32-bit but it's probably not i586.

VS2012+ defaults to SSE2 codegen, so it would be a good idea to force that off.

@alexcrichton

Copy link
Copy Markdown
Member Author

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
@rillian

rillian commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

FWIW it looks like we build gecko with /arch:IA32 except for sse(2)-specific optimization files which are compiled but whose entry points are gated by runtime cpuid detection.

@alexcrichton

Copy link
Copy Markdown
Member Author

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.

@rillian

rillian commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

jemalloc doesn't end up in the std library binaries?

@alexcrichton

Copy link
Copy Markdown
Member Author

Not for MSVC, no, we never figured out how to build it

@rillian

rillian commented Mar 4, 2016

Copy link
Copy Markdown
Contributor

Ok, thanks!

@rillian

rillian commented Mar 11, 2016

Copy link
Copy Markdown
Contributor

@aturon @brson review ping on this?

@aturon

aturon commented Mar 11, 2016

Copy link
Copy Markdown
Contributor

@bors: r+

@bors

bors commented Mar 11, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 01a2a7f has been approved by aturon

@bors

bors commented Mar 11, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 01a2a7f with merge 40c85cd...

bors added a commit that referenced this pull request Mar 11, 2016
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
@bors

bors commented Mar 11, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-gnu-64-opt

@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: retry

On Fri, Mar 11, 2016 at 12:22 AM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-64-opt
http://buildbot.rust-lang.org/builders/auto-win-gnu-64-opt/builds/3360


Reply to this email directly or view it on GitHub
#32034 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants