Skip to content

Commit c0ecd4e

Browse files
ids1024jackpot51
authored andcommitted
Use a x86_64-unknown-uefi-drv target
This is currently identical to the output of `rustc -Z unstable-options --print target-spec-json --target x86_64-unknown-uefi` except with changes to `pre-link-args`.
1 parent 13cbcf7 commit c0ecd4e

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TARGET?=x86_64-uefi-pe
1+
TARGET?=x86_64-unknown-uefi-drv
22

33
export LD=ld
44
export RUST_TARGET_PATH=$(CURDIR)/targets

firmware-setup.inf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
VALID_ARCHITECTURES = X64
1515

1616
[Binaries.X64]
17-
PE32|build/x86_64-uefi-pe/boot.efi|*
17+
PE32|build/x86_64-unknown-uefi-drv/boot.efi|*
1818

targets/x86_64-uefi-pe.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

targets/x86_64-unknown-uefi-drv.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"abi-return-struct-as-int": true,
3+
"allows-weak-linkage": false,
4+
"arch": "x86_64",
5+
"code-model": "large",
6+
"cpu": "x86-64",
7+
"data-layout": "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
8+
"disable-redzone": true,
9+
"emit-debug-gdb-scripts": false,
10+
"env": "",
11+
"exe-suffix": ".efi",
12+
"executables": true,
13+
"features": "-mmx,-sse,+soft-float",
14+
"is-builtin": true,
15+
"linker": "rust-lld",
16+
"linker-flavor": "lld-link",
17+
"lld-flavor": "link",
18+
"llvm-target": "x86_64-unknown-windows",
19+
"max-atomic-width": 64,
20+
"os": "uefi",
21+
"panic-strategy": "abort",
22+
"pre-link-args": {
23+
"lld-link": [
24+
"/entry:_start",
25+
"/heap:0,0",
26+
"/stack:0,0",
27+
"/dll",
28+
"/base:0",
29+
"/align:32",
30+
"/filealign:32",
31+
"/subsystem:efi_boot_service_driver"
32+
]
33+
},
34+
"singlethread": true,
35+
"stack-probes": true,
36+
"target-c-int-width": "32",
37+
"target-endian": "little",
38+
"target-pointer-width": "64",
39+
"vendor": "unknown"
40+
}

0 commit comments

Comments
 (0)