Skip to content

Commit

Permalink
rustc_back: Learn about i686-pc-windows-msvc
Browse files Browse the repository at this point in the history
This commit adds the i686-pc-windows-msvc triple to the compiler's repertoire of
triples to prepare for targeting 32-bit MSVC.
  • Loading branch information
alexcrichton committed Jun 27, 2015
1 parent ae36d4f commit 5de665e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions src/librustc_back/target/i686_pc_windows_msvc.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// 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::windows_msvc_base::opts();
base.cpu = "i686".to_string();

Target {
data_layout: "e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32".to_string(),
llvm_target: "i686-pc-windows-msvc".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "windows".to_string(),
target_env: "msvc".to_string(),
options: base,
}
}
3 changes: 2 additions & 1 deletion src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ impl Target {
x86_64_pc_windows_gnu,
i686_pc_windows_gnu,

x86_64_pc_windows_msvc
x86_64_pc_windows_msvc,
i686_pc_windows_msvc
);


Expand Down

0 comments on commit 5de665e

Please sign in to comment.