-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new x86_64-win7-windows-msvc target
- Loading branch information
Showing
5 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
compiler/rustc_target/src/spec/targets/x86_64_win7_windows_msvc.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::spec::{base, Target}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = base::windows_msvc::opts(); | ||
base.cpu = "x86-64".into(); | ||
base.plt_by_default = false; | ||
base.max_atomic_width = Some(64); | ||
base.vendor = "win7".into(); | ||
|
||
Target { | ||
llvm_target: "x86_64-win7-windows-msvc".into(), | ||
pointer_width: 64, | ||
data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | ||
.into(), | ||
arch: "x86_64".into(), | ||
options: base, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# *-win7-windows-msvc | ||
|
||
**Tier: 3** | ||
|
||
Windows targets continuing support of windows7. | ||
|
||
## Target maintainers | ||
|
||
- @roblabla | ||
|
||
## Requirements | ||
|
||
This target supports full the entirety of std. This is automatically tested | ||
every night on private infrastructure. Host tools may also work, though those | ||
are not currently tested. | ||
|
||
Those targets follow Windows calling convention for extern "C". | ||
|
||
Like with any other Windows target created binaries are in PE format. | ||
|
||
## Building the target | ||
|
||
You can build Rust with support for the targets by adding it to the target list in config.toml: | ||
|
||
```toml | ||
[build] | ||
build-stage = 1 | ||
target = [ "x86_64-win7-windows-msvc" ] | ||
``` | ||
|
||
## Building Rust programs | ||
|
||
Rust does not yet ship pre-compiled artifacts for this target. To compile for | ||
this target, you will either need to build Rust with the target enabled (see | ||
"Building the target" above), or build your own copy of `core` by using | ||
`build-std` or similar. | ||
|
||
## Testing | ||
|
||
Created binaries work fine on Windows or Wine using native hardware. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
Compatible C code can be built with either MSVC's `cl.exe` or LLVM's clang-cl. |