diff options
| author | bors <bors@rust-lang.org> | 2016-03-10 22:47:49 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-03-10 22:47:49 -0800 |
| commit | 40c85cd8aec5de06140252610ad4bdc352324e2c (patch) | |
| tree | 8e5daeb10ff1a5fa1a8f58df3aa51f0b74cb311d /src | |
| parent | 2b9438a4ecac26fa9c4bcdf5957bd97eb07f17dc (diff) | |
| parent | 01a2a7f99136243daf149bfe8124a6013d7115b6 (diff) | |
Auto merge of #32034 - alexcrichton:old-x86-msvc, r=aturon
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_back/target/i586_pc_windows_msvc.rs | 18 | ||||
| -rw-r--r-- | src/librustc_back/target/i586_unknown_linux_gnu.rs | 18 | ||||
| -rw-r--r-- | src/librustc_back/target/mod.rs | 1 |
3 files changed, 23 insertions, 14 deletions
diff --git a/src/librustc_back/target/i586_pc_windows_msvc.rs b/src/librustc_back/target/i586_pc_windows_msvc.rs new file mode 100644 index 00000000000..12bed370eae --- /dev/null +++ b/src/librustc_back/target/i586_pc_windows_msvc.rs @@ -0,0 +1,18 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use target::Target; + +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-msvc".to_string(); + return base +} diff --git a/src/librustc_back/target/i586_unknown_linux_gnu.rs b/src/librustc_back/target/i586_unknown_linux_gnu.rs index 42d5674a2c8..6eb64556381 100644 --- a/src/librustc_back/target/i586_unknown_linux_gnu.rs +++ b/src/librustc_back/target/i586_unknown_linux_gnu.rs @@ -11,18 +11,8 @@ use target::Target; pub fn target() -> Target { - let mut base = super::linux_base::opts(); - base.cpu = "pentium".to_string(); - base.pre_link_args.push("-m32".to_string()); - - Target { - llvm_target: "i586-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), - target_pointer_width: "32".to_string(), - arch: "x86".to_string(), - target_os: "linux".to_string(), - target_env: "gnu".to_string(), - target_vendor: "unknown".to_string(), - options: base, - } + let mut base = super::i686_unknown_linux_gnu::target(); + base.options.cpu = "pentium".to_string(); + base.llvm_target = "i586-unknown-linux-gnu".to_string(); + return base } diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index e0743c339ce..266144f61de 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -136,6 +136,7 @@ supported_targets! { ("x86_64-pc-windows-msvc", x86_64_pc_windows_msvc), ("i686-pc-windows-msvc", i686_pc_windows_msvc), + ("i586-pc-windows-msvc", i586_pc_windows_msvc), ("le32-unknown-nacl", le32_unknown_nacl), ("asmjs-unknown-emscripten", asmjs_unknown_emscripten) |
