Skip to content

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

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

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions mk/cfg/i586-pc-windows-msvc.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# i586-pc-windows-msvc configuration
CC_i586-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo
LINK_i586-pc-windows-msvc="$(CFG_MSVC_LINK_i386)" -nologo
CXX_i586-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo
CPP_i586-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo
AR_i586-pc-windows-msvc="$(CFG_MSVC_LIB_i386)" -nologo
CFG_LIB_NAME_i586-pc-windows-msvc=$(1).dll
CFG_STATIC_LIB_NAME_i586-pc-windows-msvc=$(1).lib
CFG_LIB_GLOB_i586-pc-windows-msvc=$(1)-*.{dll,lib}
CFG_LIB_DSYM_GLOB_i586-pc-windows-msvc=$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_i586-pc-windows-msvc :=
CFG_GCCISH_CFLAGS_i586-pc-windows-msvc := -MD -arch:IA32
CFG_GCCISH_CXXFLAGS_i586-pc-windows-msvc := -MD -arch:IA32
CFG_GCCISH_LINK_FLAGS_i586-pc-windows-msvc :=
CFG_GCCISH_DEF_FLAG_i586-pc-windows-msvc :=
CFG_LLC_FLAGS_i586-pc-windows-msvc :=
CFG_INSTALL_NAME_i586-pc-windows-msvc =
CFG_EXE_SUFFIX_i586-pc-windows-msvc := .exe
CFG_WINDOWSY_i586-pc-windows-msvc := 1
CFG_UNIXY_i586-pc-windows-msvc :=
CFG_LDPATH_i586-pc-windows-msvc :=
CFG_RUN_i586-pc-windows-msvc=$(2)
CFG_RUN_TARG_i586-pc-windows-msvc=$(call CFG_RUN_i586-pc-windows-msvc,,$(2))
CFG_GNU_TRIPLE_i586-pc-windows-msvc := i586-pc-win32

# Currently the build system is not configured to build jemalloc
# with MSVC, so we omit this optional dependency.
CFG_DISABLE_JEMALLOC_i586-pc-windows-msvc := 1
18 changes: 18 additions & 0 deletions src/librustc_back/target/i586_pc_windows_msvc.rs
Original file line number Diff line number Diff line change
@@ -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
}
18 changes: 4 additions & 14 deletions src/librustc_back/target/i586_unknown_linux_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down